Return null for all toCode enum params that are null (DSTU2) (#1692)

* Return null for all toCode enum params that are null

* Revert "Return null for all toCode enum params that are null"

This reverts commit 97a61b2ff9.

* Return null for all toCode enum params that are Enum.NULL
This commit is contained in:
dotasek 2024-07-19 10:24:50 -04:00 committed by GitHub
parent 0b10290f0f
commit 704ba35073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
74 changed files with 864 additions and 432 deletions

View File

@ -150,13 +150,16 @@ public class Account extends DomainResource {
throw new FHIRException("Unknown AccountStatus code '" + codeString + "'");
}
public String toCode(AccountStatus code) {
if (code == AccountStatus.ACTIVE)
public String toCode(AccountStatus code)
{
if (code == AccountStatus.NULL)
return null;
if (code == AccountStatus.ACTIVE)
return "active";
if (code == AccountStatus.INACTIVE)
return "inactive";
return "?";
}
}
}
/**

View File

@ -188,8 +188,11 @@ public class Address extends Type implements ICompositeType {
throw new FHIRException("Unknown AddressUse code '" + codeString + "'");
}
public String toCode(AddressUse code) {
if (code == AddressUse.HOME)
public String toCode(AddressUse code)
{
if (code == AddressUse.NULL)
return null;
if (code == AddressUse.HOME)
return "home";
if (code == AddressUse.WORK)
return "work";
@ -198,7 +201,7 @@ public class Address extends Type implements ICompositeType {
if (code == AddressUse.OLD)
return "old";
return "?";
}
}
}
public enum AddressType {
@ -321,15 +324,18 @@ public class Address extends Type implements ICompositeType {
throw new FHIRException("Unknown AddressType code '" + codeString + "'");
}
public String toCode(AddressType code) {
if (code == AddressType.POSTAL)
public String toCode(AddressType code)
{
if (code == AddressType.NULL)
return null;
if (code == AddressType.POSTAL)
return "postal";
if (code == AddressType.PHYSICAL)
return "physical";
if (code == AddressType.BOTH)
return "both";
return "?";
}
}
}
/**

View File

@ -248,8 +248,11 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceStatus code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceStatus code) {
if (code == AllergyIntoleranceStatus.ACTIVE)
public String toCode(AllergyIntoleranceStatus code)
{
if (code == AllergyIntoleranceStatus.NULL)
return null;
if (code == AllergyIntoleranceStatus.ACTIVE)
return "active";
if (code == AllergyIntoleranceStatus.UNCONFIRMED)
return "unconfirmed";
@ -264,7 +267,7 @@ public class AllergyIntolerance extends DomainResource {
if (code == AllergyIntoleranceStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
public enum AllergyIntoleranceCriticality {
@ -394,15 +397,18 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceCriticality code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceCriticality code) {
if (code == AllergyIntoleranceCriticality.CRITL)
public String toCode(AllergyIntoleranceCriticality code)
{
if (code == AllergyIntoleranceCriticality.NULL)
return null;
if (code == AllergyIntoleranceCriticality.CRITL)
return "CRITL";
if (code == AllergyIntoleranceCriticality.CRITH)
return "CRITH";
if (code == AllergyIntoleranceCriticality.CRITU)
return "CRITU";
return "?";
}
}
}
public enum AllergyIntoleranceType {
@ -513,13 +519,16 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceType code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceType code) {
if (code == AllergyIntoleranceType.ALLERGY)
public String toCode(AllergyIntoleranceType code)
{
if (code == AllergyIntoleranceType.NULL)
return null;
if (code == AllergyIntoleranceType.ALLERGY)
return "allergy";
if (code == AllergyIntoleranceType.INTOLERANCE)
return "intolerance";
return "?";
}
}
}
public enum AllergyIntoleranceCategory {
@ -660,8 +669,11 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceCategory code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceCategory code) {
if (code == AllergyIntoleranceCategory.FOOD)
public String toCode(AllergyIntoleranceCategory code)
{
if (code == AllergyIntoleranceCategory.NULL)
return null;
if (code == AllergyIntoleranceCategory.FOOD)
return "food";
if (code == AllergyIntoleranceCategory.MEDICATION)
return "medication";
@ -670,7 +682,7 @@ public class AllergyIntolerance extends DomainResource {
if (code == AllergyIntoleranceCategory.OTHER)
return "other";
return "?";
}
}
}
public enum AllergyIntoleranceCertainty {
@ -797,15 +809,18 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceCertainty code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceCertainty code) {
if (code == AllergyIntoleranceCertainty.UNLIKELY)
public String toCode(AllergyIntoleranceCertainty code)
{
if (code == AllergyIntoleranceCertainty.NULL)
return null;
if (code == AllergyIntoleranceCertainty.UNLIKELY)
return "unlikely";
if (code == AllergyIntoleranceCertainty.LIKELY)
return "likely";
if (code == AllergyIntoleranceCertainty.CONFIRMED)
return "confirmed";
return "?";
}
}
}
public enum AllergyIntoleranceSeverity {
@ -928,15 +943,18 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceSeverity code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceSeverity code) {
if (code == AllergyIntoleranceSeverity.MILD)
public String toCode(AllergyIntoleranceSeverity code)
{
if (code == AllergyIntoleranceSeverity.NULL)
return null;
if (code == AllergyIntoleranceSeverity.MILD)
return "mild";
if (code == AllergyIntoleranceSeverity.MODERATE)
return "moderate";
if (code == AllergyIntoleranceSeverity.SEVERE)
return "severe";
return "?";
}
}
}
@Block()

View File

@ -247,8 +247,11 @@ public class Appointment extends DomainResource {
throw new FHIRException("Unknown AppointmentStatus code '" + codeString + "'");
}
public String toCode(AppointmentStatus code) {
if (code == AppointmentStatus.PROPOSED)
public String toCode(AppointmentStatus code)
{
if (code == AppointmentStatus.NULL)
return null;
if (code == AppointmentStatus.PROPOSED)
return "proposed";
if (code == AppointmentStatus.PENDING)
return "pending";
@ -263,7 +266,7 @@ public class Appointment extends DomainResource {
if (code == AppointmentStatus.NOSHOW)
return "noshow";
return "?";
}
}
}
public enum ParticipantRequired {
@ -388,15 +391,18 @@ public class Appointment extends DomainResource {
throw new FHIRException("Unknown ParticipantRequired code '" + codeString + "'");
}
public String toCode(ParticipantRequired code) {
if (code == ParticipantRequired.REQUIRED)
public String toCode(ParticipantRequired code)
{
if (code == ParticipantRequired.NULL)
return null;
if (code == ParticipantRequired.REQUIRED)
return "required";
if (code == ParticipantRequired.OPTIONAL)
return "optional";
if (code == ParticipantRequired.INFORMATIONONLY)
return "information-only";
return "?";
}
}
}
public enum ParticipationStatus {
@ -541,8 +547,11 @@ public class Appointment extends DomainResource {
throw new FHIRException("Unknown ParticipationStatus code '" + codeString + "'");
}
public String toCode(ParticipationStatus code) {
if (code == ParticipationStatus.ACCEPTED)
public String toCode(ParticipationStatus code)
{
if (code == ParticipationStatus.NULL)
return null;
if (code == ParticipationStatus.ACCEPTED)
return "accepted";
if (code == ParticipationStatus.DECLINED)
return "declined";
@ -551,7 +560,7 @@ public class Appointment extends DomainResource {
if (code == ParticipationStatus.NEEDSACTION)
return "needs-action";
return "?";
}
}
}
@Block()

View File

@ -224,8 +224,11 @@ public class AppointmentResponse extends DomainResource {
throw new FHIRException("Unknown ParticipantStatus code '" + codeString + "'");
}
public String toCode(ParticipantStatus code) {
if (code == ParticipantStatus.ACCEPTED)
public String toCode(ParticipantStatus code)
{
if (code == ParticipantStatus.NULL)
return null;
if (code == ParticipantStatus.ACCEPTED)
return "accepted";
if (code == ParticipantStatus.DECLINED)
return "declined";
@ -238,7 +241,7 @@ public class AppointmentResponse extends DomainResource {
if (code == ParticipantStatus.NEEDSACTION)
return "needs-action";
return "?";
}
}
}
/**

View File

@ -208,8 +208,11 @@ public class AuditEvent extends DomainResource {
throw new FHIRException("Unknown AuditEventAction code '" + codeString + "'");
}
public String toCode(AuditEventAction code) {
if (code == AuditEventAction.C)
public String toCode(AuditEventAction code)
{
if (code == AuditEventAction.NULL)
return null;
if (code == AuditEventAction.C)
return "C";
if (code == AuditEventAction.R)
return "R";
@ -220,7 +223,7 @@ public class AuditEvent extends DomainResource {
if (code == AuditEventAction.E)
return "E";
return "?";
}
}
}
public enum AuditEventOutcome {
@ -364,8 +367,11 @@ public class AuditEvent extends DomainResource {
throw new FHIRException("Unknown AuditEventOutcome code '" + codeString + "'");
}
public String toCode(AuditEventOutcome code) {
if (code == AuditEventOutcome._0)
public String toCode(AuditEventOutcome code)
{
if (code == AuditEventOutcome.NULL)
return null;
if (code == AuditEventOutcome._0)
return "0";
if (code == AuditEventOutcome._4)
return "4";
@ -374,7 +380,7 @@ public class AuditEvent extends DomainResource {
if (code == AuditEventOutcome._12)
return "12";
return "?";
}
}
}
public enum AuditEventParticipantNetworkType {
@ -534,8 +540,11 @@ public class AuditEvent extends DomainResource {
throw new FHIRException("Unknown AuditEventParticipantNetworkType code '" + codeString + "'");
}
public String toCode(AuditEventParticipantNetworkType code) {
if (code == AuditEventParticipantNetworkType._1)
public String toCode(AuditEventParticipantNetworkType code)
{
if (code == AuditEventParticipantNetworkType.NULL)
return null;
if (code == AuditEventParticipantNetworkType._1)
return "1";
if (code == AuditEventParticipantNetworkType._2)
return "2";
@ -546,7 +555,7 @@ public class AuditEvent extends DomainResource {
if (code == AuditEventParticipantNetworkType._5)
return "5";
return "?";
}
}
}
@Block()

View File

@ -286,8 +286,11 @@ public class Bundle extends Resource implements IBaseBundle {
throw new FHIRException("Unknown BundleType code '" + codeString + "'");
}
public String toCode(BundleType code) {
if (code == BundleType.DOCUMENT)
public String toCode(BundleType code)
{
if (code == BundleType.NULL)
return null;
if (code == BundleType.DOCUMENT)
return "document";
if (code == BundleType.MESSAGE)
return "message";
@ -306,7 +309,7 @@ public class Bundle extends Resource implements IBaseBundle {
if (code == BundleType.COLLECTION)
return "collection";
return "?";
}
}
}
public enum SearchEntryMode {
@ -431,15 +434,18 @@ public class Bundle extends Resource implements IBaseBundle {
throw new FHIRException("Unknown SearchEntryMode code '" + codeString + "'");
}
public String toCode(SearchEntryMode code) {
if (code == SearchEntryMode.MATCH)
public String toCode(SearchEntryMode code)
{
if (code == SearchEntryMode.NULL)
return null;
if (code == SearchEntryMode.MATCH)
return "match";
if (code == SearchEntryMode.INCLUDE)
return "include";
if (code == SearchEntryMode.OUTCOME)
return "outcome";
return "?";
}
}
}
public enum HTTPVerb {
@ -580,8 +586,11 @@ public class Bundle extends Resource implements IBaseBundle {
throw new FHIRException("Unknown HTTPVerb code '" + codeString + "'");
}
public String toCode(HTTPVerb code) {
if (code == HTTPVerb.GET)
public String toCode(HTTPVerb code)
{
if (code == HTTPVerb.NULL)
return null;
if (code == HTTPVerb.GET)
return "GET";
if (code == HTTPVerb.POST)
return "POST";
@ -590,7 +599,7 @@ public class Bundle extends Resource implements IBaseBundle {
if (code == HTTPVerb.DELETE)
return "DELETE";
return "?";
}
}
}
@Block()

View File

@ -210,8 +210,11 @@ public class CarePlan extends DomainResource {
throw new FHIRException("Unknown CarePlanStatus code '" + codeString + "'");
}
public String toCode(CarePlanStatus code) {
if (code == CarePlanStatus.PROPOSED)
public String toCode(CarePlanStatus code)
{
if (code == CarePlanStatus.NULL)
return null;
if (code == CarePlanStatus.PROPOSED)
return "proposed";
if (code == CarePlanStatus.DRAFT)
return "draft";
@ -222,7 +225,7 @@ public class CarePlan extends DomainResource {
if (code == CarePlanStatus.CANCELLED)
return "cancelled";
return "?";
}
}
}
public enum CarePlanRelationship {
@ -346,15 +349,18 @@ public class CarePlan extends DomainResource {
throw new FHIRException("Unknown CarePlanRelationship code '" + codeString + "'");
}
public String toCode(CarePlanRelationship code) {
if (code == CarePlanRelationship.INCLUDES)
public String toCode(CarePlanRelationship code)
{
if (code == CarePlanRelationship.NULL)
return null;
if (code == CarePlanRelationship.INCLUDES)
return "includes";
if (code == CarePlanRelationship.REPLACES)
return "replaces";
if (code == CarePlanRelationship.FULFILLS)
return "fulfills";
return "?";
}
}
}
public enum CarePlanActivityStatus {
@ -533,8 +539,11 @@ public class CarePlan extends DomainResource {
throw new FHIRException("Unknown CarePlanActivityStatus code '" + codeString + "'");
}
public String toCode(CarePlanActivityStatus code) {
if (code == CarePlanActivityStatus.NOTSTARTED)
public String toCode(CarePlanActivityStatus code)
{
if (code == CarePlanActivityStatus.NULL)
return null;
if (code == CarePlanActivityStatus.NOTSTARTED)
return "not-started";
if (code == CarePlanActivityStatus.SCHEDULED)
return "scheduled";
@ -547,7 +556,7 @@ public class CarePlan extends DomainResource {
if (code == CarePlanActivityStatus.CANCELLED)
return "cancelled";
return "?";
}
}
}
@Block()

View File

@ -209,8 +209,11 @@ public class Claim extends DomainResource {
throw new FHIRException("Unknown ClaimType code '" + codeString + "'");
}
public String toCode(ClaimType code) {
if (code == ClaimType.INSTITUTIONAL)
public String toCode(ClaimType code)
{
if (code == ClaimType.NULL)
return null;
if (code == ClaimType.INSTITUTIONAL)
return "institutional";
if (code == ClaimType.ORAL)
return "oral";
@ -221,7 +224,7 @@ public class Claim extends DomainResource {
if (code == ClaimType.VISION)
return "vision";
return "?";
}
}
}
public enum Use {
@ -364,8 +367,11 @@ public class Claim extends DomainResource {
throw new FHIRException("Unknown Use code '" + codeString + "'");
}
public String toCode(Use code) {
if (code == Use.COMPLETE)
public String toCode(Use code)
{
if (code == Use.NULL)
return null;
if (code == Use.COMPLETE)
return "complete";
if (code == Use.PROPOSED)
return "proposed";
@ -374,7 +380,7 @@ public class Claim extends DomainResource {
if (code == Use.OTHER)
return "other";
return "?";
}
}
}
@Block()

View File

@ -176,15 +176,18 @@ public class ClinicalImpression extends DomainResource {
throw new FHIRException("Unknown ClinicalImpressionStatus code '" + codeString + "'");
}
public String toCode(ClinicalImpressionStatus code) {
if (code == ClinicalImpressionStatus.INPROGRESS)
public String toCode(ClinicalImpressionStatus code)
{
if (code == ClinicalImpressionStatus.NULL)
return null;
if (code == ClinicalImpressionStatus.INPROGRESS)
return "in-progress";
if (code == ClinicalImpressionStatus.COMPLETED)
return "completed";
if (code == ClinicalImpressionStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
@Block()

View File

@ -208,8 +208,11 @@ public class Communication extends DomainResource {
throw new FHIRException("Unknown CommunicationStatus code '" + codeString + "'");
}
public String toCode(CommunicationStatus code) {
if (code == CommunicationStatus.INPROGRESS)
public String toCode(CommunicationStatus code)
{
if (code == CommunicationStatus.NULL)
return null;
if (code == CommunicationStatus.INPROGRESS)
return "in-progress";
if (code == CommunicationStatus.COMPLETED)
return "completed";
@ -220,7 +223,7 @@ public class Communication extends DomainResource {
if (code == CommunicationStatus.FAILED)
return "failed";
return "?";
}
}
}
@Block()

View File

@ -299,8 +299,11 @@ public class CommunicationRequest extends DomainResource {
throw new FHIRException("Unknown CommunicationRequestStatus code '" + codeString + "'");
}
public String toCode(CommunicationRequestStatus code) {
if (code == CommunicationRequestStatus.PROPOSED)
public String toCode(CommunicationRequestStatus code)
{
if (code == CommunicationRequestStatus.NULL)
return null;
if (code == CommunicationRequestStatus.PROPOSED)
return "proposed";
if (code == CommunicationRequestStatus.PLANNED)
return "planned";
@ -321,7 +324,7 @@ public class CommunicationRequest extends DomainResource {
if (code == CommunicationRequestStatus.FAILED)
return "failed";
return "?";
}
}
}
@Block()

View File

@ -200,8 +200,11 @@ public class Composition extends DomainResource {
throw new FHIRException("Unknown CompositionStatus code '" + codeString + "'");
}
public String toCode(CompositionStatus code) {
if (code == CompositionStatus.PRELIMINARY)
public String toCode(CompositionStatus code)
{
if (code == CompositionStatus.NULL)
return null;
if (code == CompositionStatus.PRELIMINARY)
return "preliminary";
if (code == CompositionStatus.FINAL)
return "final";
@ -210,7 +213,7 @@ public class Composition extends DomainResource {
if (code == CompositionStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
public enum CompositionAttestationMode {
@ -353,8 +356,11 @@ public class Composition extends DomainResource {
throw new FHIRException("Unknown CompositionAttestationMode code '" + codeString + "'");
}
public String toCode(CompositionAttestationMode code) {
if (code == CompositionAttestationMode.PERSONAL)
public String toCode(CompositionAttestationMode code)
{
if (code == CompositionAttestationMode.NULL)
return null;
if (code == CompositionAttestationMode.PERSONAL)
return "personal";
if (code == CompositionAttestationMode.PROFESSIONAL)
return "professional";
@ -363,7 +369,7 @@ public class Composition extends DomainResource {
if (code == CompositionAttestationMode.OFFICIAL)
return "official";
return "?";
}
}
}
@Block()

View File

@ -231,8 +231,11 @@ public class Condition extends DomainResource {
throw new FHIRException("Unknown ConditionVerificationStatus code '" + codeString + "'");
}
public String toCode(ConditionVerificationStatus code) {
if (code == ConditionVerificationStatus.PROVISIONAL)
public String toCode(ConditionVerificationStatus code)
{
if (code == ConditionVerificationStatus.NULL)
return null;
if (code == ConditionVerificationStatus.PROVISIONAL)
return "provisional";
if (code == ConditionVerificationStatus.DIFFERENTIAL)
return "differential";
@ -245,7 +248,7 @@ public class Condition extends DomainResource {
if (code == ConditionVerificationStatus.UNKNOWN)
return "unknown";
return "?";
}
}
}
@Block()

View File

@ -180,15 +180,18 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown ConformanceStatementKind code '" + codeString + "'");
}
public String toCode(ConformanceStatementKind code) {
if (code == ConformanceStatementKind.INSTANCE)
public String toCode(ConformanceStatementKind code)
{
if (code == ConformanceStatementKind.NULL)
return null;
if (code == ConformanceStatementKind.INSTANCE)
return "instance";
if (code == ConformanceStatementKind.CAPABILITY)
return "capability";
if (code == ConformanceStatementKind.REQUIREMENTS)
return "requirements";
return "?";
}
}
}
public enum UnknownContentCode {
@ -329,8 +332,11 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown UnknownContentCode code '" + codeString + "'");
}
public String toCode(UnknownContentCode code) {
if (code == UnknownContentCode.NO)
public String toCode(UnknownContentCode code)
{
if (code == UnknownContentCode.NULL)
return null;
if (code == UnknownContentCode.NO)
return "no";
if (code == UnknownContentCode.EXTENSIONS)
return "extensions";
@ -339,7 +345,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
if (code == UnknownContentCode.BOTH)
return "both";
return "?";
}
}
}
public enum RestfulConformanceMode {
@ -444,13 +450,16 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown RestfulConformanceMode code '" + codeString + "'");
}
public String toCode(RestfulConformanceMode code) {
if (code == RestfulConformanceMode.CLIENT)
public String toCode(RestfulConformanceMode code)
{
if (code == RestfulConformanceMode.NULL)
return null;
if (code == RestfulConformanceMode.CLIENT)
return "client";
if (code == RestfulConformanceMode.SERVER)
return "server";
return "?";
}
}
}
public enum TypeRestfulInteraction {
@ -681,8 +690,11 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown TypeRestfulInteraction code '" + codeString + "'");
}
public String toCode(TypeRestfulInteraction code) {
if (code == TypeRestfulInteraction.READ)
public String toCode(TypeRestfulInteraction code)
{
if (code == TypeRestfulInteraction.NULL)
return null;
if (code == TypeRestfulInteraction.READ)
return "read";
if (code == TypeRestfulInteraction.VREAD)
return "vread";
@ -701,7 +713,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
if (code == TypeRestfulInteraction.SEARCHTYPE)
return "search-type";
return "?";
}
}
}
public enum ResourceVersionPolicy {
@ -825,15 +837,18 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown ResourceVersionPolicy code '" + codeString + "'");
}
public String toCode(ResourceVersionPolicy code) {
if (code == ResourceVersionPolicy.NOVERSION)
public String toCode(ResourceVersionPolicy code)
{
if (code == ResourceVersionPolicy.NULL)
return null;
if (code == ResourceVersionPolicy.NOVERSION)
return "no-version";
if (code == ResourceVersionPolicy.VERSIONED)
return "versioned";
if (code == ResourceVersionPolicy.VERSIONEDUPDATE)
return "versioned-update";
return "?";
}
}
}
public enum ConditionalDeleteStatus {
@ -957,15 +972,18 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown ConditionalDeleteStatus code '" + codeString + "'");
}
public String toCode(ConditionalDeleteStatus code) {
if (code == ConditionalDeleteStatus.NOTSUPPORTED)
public String toCode(ConditionalDeleteStatus code)
{
if (code == ConditionalDeleteStatus.NULL)
return null;
if (code == ConditionalDeleteStatus.NOTSUPPORTED)
return "not-supported";
if (code == ConditionalDeleteStatus.SINGLE)
return "single";
if (code == ConditionalDeleteStatus.MULTIPLE)
return "multiple";
return "?";
}
}
}
public enum SearchModifierCode {
@ -1225,8 +1243,11 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown SearchModifierCode code '" + codeString + "'");
}
public String toCode(SearchModifierCode code) {
if (code == SearchModifierCode.MISSING)
public String toCode(SearchModifierCode code)
{
if (code == SearchModifierCode.NULL)
return null;
if (code == SearchModifierCode.MISSING)
return "missing";
if (code == SearchModifierCode.EXACT)
return "exact";
@ -1247,7 +1268,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
if (code == SearchModifierCode.TYPE)
return "type";
return "?";
}
}
}
public enum SystemRestfulInteraction {
@ -1370,15 +1391,18 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown SystemRestfulInteraction code '" + codeString + "'");
}
public String toCode(SystemRestfulInteraction code) {
if (code == SystemRestfulInteraction.TRANSACTION)
public String toCode(SystemRestfulInteraction code)
{
if (code == SystemRestfulInteraction.NULL)
return null;
if (code == SystemRestfulInteraction.TRANSACTION)
return "transaction";
if (code == SystemRestfulInteraction.SEARCHSYSTEM)
return "search-system";
if (code == SystemRestfulInteraction.HISTORYSYSTEM)
return "history-system";
return "?";
}
}
}
public enum TransactionMode {
@ -1519,8 +1543,11 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown TransactionMode code '" + codeString + "'");
}
public String toCode(TransactionMode code) {
if (code == TransactionMode.NOTSUPPORTED)
public String toCode(TransactionMode code)
{
if (code == TransactionMode.NULL)
return null;
if (code == TransactionMode.NOTSUPPORTED)
return "not-supported";
if (code == TransactionMode.BATCH)
return "batch";
@ -1529,7 +1556,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
if (code == TransactionMode.BOTH)
return "both";
return "?";
}
}
}
public enum MessageSignificanceCategory {
@ -1656,15 +1683,18 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown MessageSignificanceCategory code '" + codeString + "'");
}
public String toCode(MessageSignificanceCategory code) {
if (code == MessageSignificanceCategory.CONSEQUENCE)
public String toCode(MessageSignificanceCategory code)
{
if (code == MessageSignificanceCategory.NULL)
return null;
if (code == MessageSignificanceCategory.CONSEQUENCE)
return "Consequence";
if (code == MessageSignificanceCategory.CURRENCY)
return "Currency";
if (code == MessageSignificanceCategory.NOTIFICATION)
return "Notification";
return "?";
}
}
}
public enum ConformanceEventMode {
@ -1769,13 +1799,16 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown ConformanceEventMode code '" + codeString + "'");
}
public String toCode(ConformanceEventMode code) {
if (code == ConformanceEventMode.SENDER)
public String toCode(ConformanceEventMode code)
{
if (code == ConformanceEventMode.NULL)
return null;
if (code == ConformanceEventMode.SENDER)
return "sender";
if (code == ConformanceEventMode.RECEIVER)
return "receiver";
return "?";
}
}
}
public enum DocumentMode {
@ -1880,13 +1913,16 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown DocumentMode code '" + codeString + "'");
}
public String toCode(DocumentMode code) {
if (code == DocumentMode.PRODUCER)
public String toCode(DocumentMode code)
{
if (code == DocumentMode.NULL)
return null;
if (code == DocumentMode.PRODUCER)
return "producer";
if (code == DocumentMode.CONSUMER)
return "consumer";
return "?";
}
}
}
@Block()

View File

@ -209,8 +209,11 @@ public class ContactPoint extends Type implements ICompositeType {
throw new FHIRException("Unknown ContactPointSystem code '" + codeString + "'");
}
public String toCode(ContactPointSystem code) {
if (code == ContactPointSystem.PHONE)
public String toCode(ContactPointSystem code)
{
if (code == ContactPointSystem.NULL)
return null;
if (code == ContactPointSystem.PHONE)
return "phone";
if (code == ContactPointSystem.FAX)
return "fax";
@ -221,7 +224,7 @@ public class ContactPoint extends Type implements ICompositeType {
if (code == ContactPointSystem.OTHER)
return "other";
return "?";
}
}
}
public enum ContactPointUse {
@ -387,8 +390,11 @@ public class ContactPoint extends Type implements ICompositeType {
throw new FHIRException("Unknown ContactPointUse code '" + codeString + "'");
}
public String toCode(ContactPointUse code) {
if (code == ContactPointUse.HOME)
public String toCode(ContactPointUse code)
{
if (code == ContactPointUse.NULL)
return null;
if (code == ContactPointUse.HOME)
return "home";
if (code == ContactPointUse.WORK)
return "work";
@ -399,7 +405,7 @@ public class ContactPoint extends Type implements ICompositeType {
if (code == ContactPointUse.MOBILE)
return "mobile";
return "?";
}
}
}
/**

View File

@ -238,8 +238,11 @@ public class DataElement extends DomainResource {
throw new FHIRException("Unknown DataElementStringency code '" + codeString + "'");
}
public String toCode(DataElementStringency code) {
if (code == DataElementStringency.COMPARABLE)
public String toCode(DataElementStringency code)
{
if (code == DataElementStringency.NULL)
return null;
if (code == DataElementStringency.COMPARABLE)
return "comparable";
if (code == DataElementStringency.FULLYSPECIFIED)
return "fully-specified";
@ -252,7 +255,7 @@ public class DataElement extends DomainResource {
if (code == DataElementStringency.FLEXIBLE)
return "flexible";
return "?";
}
}
}
@Block()

View File

@ -175,15 +175,18 @@ public class DetectedIssue extends DomainResource {
throw new FHIRException("Unknown DetectedIssueSeverity code '" + codeString + "'");
}
public String toCode(DetectedIssueSeverity code) {
if (code == DetectedIssueSeverity.HIGH)
public String toCode(DetectedIssueSeverity code)
{
if (code == DetectedIssueSeverity.NULL)
return null;
if (code == DetectedIssueSeverity.HIGH)
return "high";
if (code == DetectedIssueSeverity.MODERATE)
return "moderate";
if (code == DetectedIssueSeverity.LOW)
return "low";
return "?";
}
}
}
@Block()

View File

@ -173,15 +173,18 @@ public class Device extends DomainResource {
throw new FHIRException("Unknown DeviceStatus code '" + codeString + "'");
}
public String toCode(DeviceStatus code) {
if (code == DeviceStatus.AVAILABLE)
public String toCode(DeviceStatus code)
{
if (code == DeviceStatus.NULL)
return null;
if (code == DeviceStatus.AVAILABLE)
return "available";
if (code == DeviceStatus.NOTAVAILABLE)
return "not-available";
if (code == DeviceStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
/**

View File

@ -314,8 +314,11 @@ public class DeviceComponent extends DomainResource {
throw new FHIRException("Unknown MeasmntPrinciple code '" + codeString + "'");
}
public String toCode(MeasmntPrinciple code) {
if (code == MeasmntPrinciple.OTHER)
public String toCode(MeasmntPrinciple code)
{
if (code == MeasmntPrinciple.NULL)
return null;
if (code == MeasmntPrinciple.OTHER)
return "other";
if (code == MeasmntPrinciple.CHEMICAL)
return "chemical";
@ -338,7 +341,7 @@ public class DeviceComponent extends DomainResource {
if (code == MeasmntPrinciple.MANUAL)
return "manual";
return "?";
}
}
}
@Block()

View File

@ -169,15 +169,18 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricOperationalStatus code '" + codeString + "'");
}
public String toCode(DeviceMetricOperationalStatus code) {
if (code == DeviceMetricOperationalStatus.ON)
public String toCode(DeviceMetricOperationalStatus code)
{
if (code == DeviceMetricOperationalStatus.NULL)
return null;
if (code == DeviceMetricOperationalStatus.ON)
return "on";
if (code == DeviceMetricOperationalStatus.OFF)
return "off";
if (code == DeviceMetricOperationalStatus.STANDBY)
return "standby";
return "?";
}
}
}
public enum DeviceMetricColor {
@ -390,8 +393,11 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricColor code '" + codeString + "'");
}
public String toCode(DeviceMetricColor code) {
if (code == DeviceMetricColor.BLACK)
public String toCode(DeviceMetricColor code)
{
if (code == DeviceMetricColor.NULL)
return null;
if (code == DeviceMetricColor.BLACK)
return "black";
if (code == DeviceMetricColor.RED)
return "red";
@ -408,7 +414,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricColor.WHITE)
return "white";
return "?";
}
}
}
public enum DeviceMetricCategory {
@ -550,8 +556,11 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricCategory code '" + codeString + "'");
}
public String toCode(DeviceMetricCategory code) {
if (code == DeviceMetricCategory.MEASUREMENT)
public String toCode(DeviceMetricCategory code)
{
if (code == DeviceMetricCategory.NULL)
return null;
if (code == DeviceMetricCategory.MEASUREMENT)
return "measurement";
if (code == DeviceMetricCategory.SETTING)
return "setting";
@ -560,7 +569,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricCategory.UNSPECIFIED)
return "unspecified";
return "?";
}
}
}
public enum DeviceMetricCalibrationType {
@ -701,8 +710,11 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricCalibrationType code '" + codeString + "'");
}
public String toCode(DeviceMetricCalibrationType code) {
if (code == DeviceMetricCalibrationType.UNSPECIFIED)
public String toCode(DeviceMetricCalibrationType code)
{
if (code == DeviceMetricCalibrationType.NULL)
return null;
if (code == DeviceMetricCalibrationType.UNSPECIFIED)
return "unspecified";
if (code == DeviceMetricCalibrationType.OFFSET)
return "offset";
@ -711,7 +723,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricCalibrationType.TWOPOINT)
return "two-point";
return "?";
}
}
}
public enum DeviceMetricCalibrationState {
@ -852,8 +864,11 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricCalibrationState code '" + codeString + "'");
}
public String toCode(DeviceMetricCalibrationState code) {
if (code == DeviceMetricCalibrationState.NOTCALIBRATED)
public String toCode(DeviceMetricCalibrationState code)
{
if (code == DeviceMetricCalibrationState.NULL)
return null;
if (code == DeviceMetricCalibrationState.NOTCALIBRATED)
return "not-calibrated";
if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED)
return "calibration-required";
@ -862,7 +877,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricCalibrationState.UNSPECIFIED)
return "unspecified";
return "?";
}
}
}
@Block()

View File

@ -296,8 +296,11 @@ public class DeviceUseRequest extends DomainResource {
throw new FHIRException("Unknown DeviceUseRequestStatus code '" + codeString + "'");
}
public String toCode(DeviceUseRequestStatus code) {
if (code == DeviceUseRequestStatus.PROPOSED)
public String toCode(DeviceUseRequestStatus code)
{
if (code == DeviceUseRequestStatus.NULL)
return null;
if (code == DeviceUseRequestStatus.PROPOSED)
return "proposed";
if (code == DeviceUseRequestStatus.PLANNED)
return "planned";
@ -318,7 +321,7 @@ public class DeviceUseRequest extends DomainResource {
if (code == DeviceUseRequestStatus.ABORTED)
return "aborted";
return "?";
}
}
}
public enum DeviceUseRequestPriority {
@ -459,8 +462,11 @@ public class DeviceUseRequest extends DomainResource {
throw new FHIRException("Unknown DeviceUseRequestPriority code '" + codeString + "'");
}
public String toCode(DeviceUseRequestPriority code) {
if (code == DeviceUseRequestPriority.ROUTINE)
public String toCode(DeviceUseRequestPriority code)
{
if (code == DeviceUseRequestPriority.NULL)
return null;
if (code == DeviceUseRequestPriority.ROUTINE)
return "routine";
if (code == DeviceUseRequestPriority.URGENT)
return "urgent";
@ -469,7 +475,7 @@ public class DeviceUseRequest extends DomainResource {
if (code == DeviceUseRequestPriority.ASAP)
return "asap";
return "?";
}
}
}
/**

View File

@ -351,8 +351,11 @@ public class DiagnosticOrder extends DomainResource {
throw new FHIRException("Unknown DiagnosticOrderStatus code '" + codeString + "'");
}
public String toCode(DiagnosticOrderStatus code) {
if (code == DiagnosticOrderStatus.PROPOSED)
public String toCode(DiagnosticOrderStatus code)
{
if (code == DiagnosticOrderStatus.NULL)
return null;
if (code == DiagnosticOrderStatus.PROPOSED)
return "proposed";
if (code == DiagnosticOrderStatus.DRAFT)
return "draft";
@ -379,7 +382,7 @@ public class DiagnosticOrder extends DomainResource {
if (code == DiagnosticOrderStatus.FAILED)
return "failed";
return "?";
}
}
}
public enum DiagnosticOrderPriority {
@ -520,8 +523,11 @@ public class DiagnosticOrder extends DomainResource {
throw new FHIRException("Unknown DiagnosticOrderPriority code '" + codeString + "'");
}
public String toCode(DiagnosticOrderPriority code) {
if (code == DiagnosticOrderPriority.ROUTINE)
public String toCode(DiagnosticOrderPriority code)
{
if (code == DiagnosticOrderPriority.NULL)
return null;
if (code == DiagnosticOrderPriority.ROUTINE)
return "routine";
if (code == DiagnosticOrderPriority.URGENT)
return "urgent";
@ -530,7 +536,7 @@ public class DiagnosticOrder extends DomainResource {
if (code == DiagnosticOrderPriority.ASAP)
return "asap";
return "?";
}
}
}
@Block()

View File

@ -252,8 +252,11 @@ public class DiagnosticReport extends DomainResource {
throw new FHIRException("Unknown DiagnosticReportStatus code '" + codeString + "'");
}
public String toCode(DiagnosticReportStatus code) {
if (code == DiagnosticReportStatus.REGISTERED)
public String toCode(DiagnosticReportStatus code)
{
if (code == DiagnosticReportStatus.NULL)
return null;
if (code == DiagnosticReportStatus.REGISTERED)
return "registered";
if (code == DiagnosticReportStatus.PARTIAL)
return "partial";
@ -268,7 +271,7 @@ public class DiagnosticReport extends DomainResource {
if (code == DiagnosticReportStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
@Block()

View File

@ -190,8 +190,11 @@ public class DocumentReference extends DomainResource {
throw new FHIRException("Unknown DocumentRelationshipType code '" + codeString + "'");
}
public String toCode(DocumentRelationshipType code) {
if (code == DocumentRelationshipType.REPLACES)
public String toCode(DocumentRelationshipType code)
{
if (code == DocumentRelationshipType.NULL)
return null;
if (code == DocumentRelationshipType.REPLACES)
return "replaces";
if (code == DocumentRelationshipType.TRANSFORMS)
return "transforms";
@ -200,7 +203,7 @@ public class DocumentReference extends DomainResource {
if (code == DocumentRelationshipType.APPENDS)
return "appends";
return "?";
}
}
}
@Block()

View File

@ -135,11 +135,14 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown PropertyRepresentation code '" + codeString + "'");
}
public String toCode(PropertyRepresentation code) {
if (code == PropertyRepresentation.XMLATTR)
public String toCode(PropertyRepresentation code)
{
if (code == PropertyRepresentation.NULL)
return null;
if (code == PropertyRepresentation.XMLATTR)
return "xmlAttr";
return "?";
}
}
}
public enum SlicingRules {
@ -265,15 +268,18 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown SlicingRules code '" + codeString + "'");
}
public String toCode(SlicingRules code) {
if (code == SlicingRules.CLOSED)
public String toCode(SlicingRules code)
{
if (code == SlicingRules.NULL)
return null;
if (code == SlicingRules.CLOSED)
return "closed";
if (code == SlicingRules.OPEN)
return "open";
if (code == SlicingRules.OPENATEND)
return "openAtEnd";
return "?";
}
}
}
public enum AggregationMode {
@ -398,15 +404,18 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown AggregationMode code '" + codeString + "'");
}
public String toCode(AggregationMode code) {
if (code == AggregationMode.CONTAINED)
public String toCode(AggregationMode code)
{
if (code == AggregationMode.NULL)
return null;
if (code == AggregationMode.CONTAINED)
return "contained";
if (code == AggregationMode.REFERENCED)
return "referenced";
if (code == AggregationMode.BUNDLED)
return "bundled";
return "?";
}
}
}
public enum ConstraintSeverity {
@ -512,13 +521,16 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown ConstraintSeverity code '" + codeString + "'");
}
public String toCode(ConstraintSeverity code) {
if (code == ConstraintSeverity.ERROR)
public String toCode(ConstraintSeverity code)
{
if (code == ConstraintSeverity.NULL)
return null;
if (code == ConstraintSeverity.ERROR)
return "error";
if (code == ConstraintSeverity.WARNING)
return "warning";
return "?";
}
}
}
@Block()

View File

@ -225,8 +225,11 @@ public class Encounter extends DomainResource {
throw new FHIRException("Unknown EncounterState code '" + codeString + "'");
}
public String toCode(EncounterState code) {
if (code == EncounterState.PLANNED)
public String toCode(EncounterState code)
{
if (code == EncounterState.NULL)
return null;
if (code == EncounterState.PLANNED)
return "planned";
if (code == EncounterState.ARRIVED)
return "arrived";
@ -239,7 +242,7 @@ public class Encounter extends DomainResource {
if (code == EncounterState.CANCELLED)
return "cancelled";
return "?";
}
}
}
public enum EncounterClass {
@ -476,8 +479,11 @@ public class Encounter extends DomainResource {
throw new FHIRException("Unknown EncounterClass code '" + codeString + "'");
}
public String toCode(EncounterClass code) {
if (code == EncounterClass.INPATIENT)
public String toCode(EncounterClass code)
{
if (code == EncounterClass.NULL)
return null;
if (code == EncounterClass.INPATIENT)
return "inpatient";
if (code == EncounterClass.OUTPATIENT)
return "outpatient";
@ -496,7 +502,7 @@ public class Encounter extends DomainResource {
if (code == EncounterClass.OTHER)
return "other";
return "?";
}
}
}
public enum EncounterLocationStatus {
@ -644,8 +650,11 @@ public class Encounter extends DomainResource {
throw new FHIRException("Unknown EncounterLocationStatus code '" + codeString + "'");
}
public String toCode(EncounterLocationStatus code) {
if (code == EncounterLocationStatus.PLANNED)
public String toCode(EncounterLocationStatus code)
{
if (code == EncounterLocationStatus.NULL)
return null;
if (code == EncounterLocationStatus.PLANNED)
return "planned";
if (code == EncounterLocationStatus.ACTIVE)
return "active";
@ -654,7 +663,7 @@ public class Encounter extends DomainResource {
if (code == EncounterLocationStatus.COMPLETED)
return "completed";
return "?";
}
}
}
@Block()

View File

@ -188,8 +188,11 @@ public class Enumerations {
throw new FHIRException("Unknown AdministrativeGender code '" + codeString + "'");
}
public String toCode(AdministrativeGender code) {
if (code == AdministrativeGender.MALE)
public String toCode(AdministrativeGender code)
{
if (code == AdministrativeGender.NULL)
return null;
if (code == AdministrativeGender.MALE)
return "male";
if (code == AdministrativeGender.FEMALE)
return "female";
@ -198,7 +201,7 @@ public class Enumerations {
if (code == AdministrativeGender.UNKNOWN)
return "unknown";
return "?";
}
}
}
public enum AgeUnits {
@ -375,8 +378,11 @@ public class Enumerations {
throw new FHIRException("Unknown AgeUnits code '" + codeString + "'");
}
public String toCode(AgeUnits code) {
if (code == AgeUnits.MIN)
public String toCode(AgeUnits code)
{
if (code == AgeUnits.NULL)
return null;
if (code == AgeUnits.MIN)
return "min";
if (code == AgeUnits.H)
return "h";
@ -389,7 +395,7 @@ public class Enumerations {
if (code == AgeUnits.A)
return "a";
return "?";
}
}
}
public enum BindingStrength {
@ -539,8 +545,11 @@ public class Enumerations {
throw new FHIRException("Unknown BindingStrength code '" + codeString + "'");
}
public String toCode(BindingStrength code) {
if (code == BindingStrength.REQUIRED)
public String toCode(BindingStrength code)
{
if (code == BindingStrength.NULL)
return null;
if (code == BindingStrength.REQUIRED)
return "required";
if (code == BindingStrength.EXTENSIBLE)
return "extensible";
@ -549,7 +558,7 @@ public class Enumerations {
if (code == BindingStrength.EXAMPLE)
return "example";
return "?";
}
}
}
public enum ConceptMapEquivalence {
@ -795,8 +804,11 @@ public class Enumerations {
throw new FHIRException("Unknown ConceptMapEquivalence code '" + codeString + "'");
}
public String toCode(ConceptMapEquivalence code) {
if (code == ConceptMapEquivalence.EQUIVALENT)
public String toCode(ConceptMapEquivalence code)
{
if (code == ConceptMapEquivalence.NULL)
return null;
if (code == ConceptMapEquivalence.EQUIVALENT)
return "equivalent";
if (code == ConceptMapEquivalence.EQUAL)
return "equal";
@ -815,7 +827,7 @@ public class Enumerations {
if (code == ConceptMapEquivalence.DISJOINT)
return "disjoint";
return "?";
}
}
}
public enum ConformanceResourceStatus {
@ -938,15 +950,18 @@ public class Enumerations {
throw new FHIRException("Unknown ConformanceResourceStatus code '" + codeString + "'");
}
public String toCode(ConformanceResourceStatus code) {
if (code == ConformanceResourceStatus.DRAFT)
public String toCode(ConformanceResourceStatus code)
{
if (code == ConformanceResourceStatus.NULL)
return null;
if (code == ConformanceResourceStatus.DRAFT)
return "draft";
if (code == ConformanceResourceStatus.ACTIVE)
return "active";
if (code == ConformanceResourceStatus.RETIRED)
return "retired";
return "?";
}
}
}
public enum DataAbsentReason {
@ -1180,8 +1195,11 @@ public class Enumerations {
throw new FHIRException("Unknown DataAbsentReason code '" + codeString + "'");
}
public String toCode(DataAbsentReason code) {
if (code == DataAbsentReason.UNKNOWN)
public String toCode(DataAbsentReason code)
{
if (code == DataAbsentReason.NULL)
return null;
if (code == DataAbsentReason.UNKNOWN)
return "unknown";
if (code == DataAbsentReason.ASKED)
return "asked";
@ -1200,7 +1218,7 @@ public class Enumerations {
if (code == DataAbsentReason.NAN)
return "NaN";
return "?";
}
}
}
public enum DataType {
@ -2128,8 +2146,11 @@ public class Enumerations {
throw new FHIRException("Unknown DataType code '" + codeString + "'");
}
public String toCode(DataType code) {
if (code == DataType.ADDRESS)
public String toCode(DataType code)
{
if (code == DataType.NULL)
return null;
if (code == DataType.ADDRESS)
return "Address";
if (code == DataType.AGE)
return "Age";
@ -2222,7 +2243,7 @@ public class Enumerations {
if (code == DataType.XHTML)
return "xhtml";
return "?";
}
}
}
public enum DocumentReferenceStatus {
@ -2345,15 +2366,18 @@ public class Enumerations {
throw new FHIRException("Unknown DocumentReferenceStatus code '" + codeString + "'");
}
public String toCode(DocumentReferenceStatus code) {
if (code == DocumentReferenceStatus.CURRENT)
public String toCode(DocumentReferenceStatus code)
{
if (code == DocumentReferenceStatus.NULL)
return null;
if (code == DocumentReferenceStatus.CURRENT)
return "current";
if (code == DocumentReferenceStatus.SUPERSEDED)
return "superseded";
if (code == DocumentReferenceStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
public enum FHIRDefinedType {
@ -5194,8 +5218,11 @@ public class Enumerations {
throw new FHIRException("Unknown FHIRDefinedType code '" + codeString + "'");
}
public String toCode(FHIRDefinedType code) {
if (code == FHIRDefinedType.ADDRESS)
public String toCode(FHIRDefinedType code)
{
if (code == FHIRDefinedType.NULL)
return null;
if (code == FHIRDefinedType.ADDRESS)
return "Address";
if (code == FHIRDefinedType.AGE)
return "Age";
@ -5480,7 +5507,7 @@ public class Enumerations {
if (code == FHIRDefinedType.VISIONPRESCRIPTION)
return "VisionPrescription";
return "?";
}
}
}
public enum MessageEvent {
@ -5737,8 +5764,11 @@ public class Enumerations {
throw new FHIRException("Unknown MessageEvent code '" + codeString + "'");
}
public String toCode(MessageEvent code) {
if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE)
public String toCode(MessageEvent code)
{
if (code == MessageEvent.NULL)
return null;
if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE)
return "MedicationAdministration-Complete";
if (code == MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION)
return "MedicationAdministration-Nullification";
@ -5759,7 +5789,7 @@ public class Enumerations {
if (code == MessageEvent.VALUESETEXPAND)
return "valueset-expand";
return "?";
}
}
}
public enum NoteType {
@ -5882,15 +5912,18 @@ public class Enumerations {
throw new FHIRException("Unknown NoteType code '" + codeString + "'");
}
public String toCode(NoteType code) {
if (code == NoteType.DISPLAY)
public String toCode(NoteType code)
{
if (code == NoteType.NULL)
return null;
if (code == NoteType.DISPLAY)
return "display";
if (code == NoteType.PRINT)
return "print";
if (code == NoteType.PRINTOPER)
return "printoper";
return "?";
}
}
}
public enum RemittanceOutcome {
@ -5995,13 +6028,16 @@ public class Enumerations {
throw new FHIRException("Unknown RemittanceOutcome code '" + codeString + "'");
}
public String toCode(RemittanceOutcome code) {
if (code == RemittanceOutcome.COMPLETE)
public String toCode(RemittanceOutcome code)
{
if (code == RemittanceOutcome.NULL)
return null;
if (code == RemittanceOutcome.COMPLETE)
return "complete";
if (code == RemittanceOutcome.ERROR)
return "error";
return "?";
}
}
}
public enum ResourceType {
@ -7983,8 +8019,11 @@ public class Enumerations {
throw new FHIRException("Unknown ResourceType code '" + codeString + "'");
}
public String toCode(ResourceType code) {
if (code == ResourceType.ACCOUNT)
public String toCode(ResourceType code)
{
if (code == ResourceType.NULL)
return null;
if (code == ResourceType.ACCOUNT)
return "Account";
if (code == ResourceType.ALLERGYINTOLERANCE)
return "AllergyIntolerance";
@ -8177,7 +8216,7 @@ public class Enumerations {
if (code == ResourceType.VISIONPRESCRIPTION)
return "VisionPrescription";
return "?";
}
}
}
public enum SearchParamType {
@ -8397,8 +8436,11 @@ public class Enumerations {
throw new FHIRException("Unknown SearchParamType code '" + codeString + "'");
}
public String toCode(SearchParamType code) {
if (code == SearchParamType.NUMBER)
public String toCode(SearchParamType code)
{
if (code == SearchParamType.NULL)
return null;
if (code == SearchParamType.NUMBER)
return "number";
if (code == SearchParamType.DATE)
return "date";
@ -8415,7 +8457,7 @@ public class Enumerations {
if (code == SearchParamType.URI)
return "uri";
return "?";
}
}
}
public enum SpecialValues {
@ -8593,8 +8635,11 @@ public class Enumerations {
throw new FHIRException("Unknown SpecialValues code '" + codeString + "'");
}
public String toCode(SpecialValues code) {
if (code == SpecialValues.TRUE)
public String toCode(SpecialValues code)
{
if (code == SpecialValues.NULL)
return null;
if (code == SpecialValues.TRUE)
return "true";
if (code == SpecialValues.FALSE)
return "false";
@ -8607,7 +8652,7 @@ public class Enumerations {
if (code == SpecialValues.NILKNOWN)
return "nil-known";
return "?";
}
}
}
}

View File

@ -234,8 +234,11 @@ public class EpisodeOfCare extends DomainResource {
throw new FHIRException("Unknown EpisodeOfCareStatus code '" + codeString + "'");
}
public String toCode(EpisodeOfCareStatus code) {
if (code == EpisodeOfCareStatus.PLANNED)
public String toCode(EpisodeOfCareStatus code)
{
if (code == EpisodeOfCareStatus.NULL)
return null;
if (code == EpisodeOfCareStatus.PLANNED)
return "planned";
if (code == EpisodeOfCareStatus.WAITLIST)
return "waitlist";
@ -248,7 +251,7 @@ public class EpisodeOfCare extends DomainResource {
if (code == EpisodeOfCareStatus.CANCELLED)
return "cancelled";
return "?";
}
}
}
@Block()

View File

@ -191,8 +191,11 @@ public class FamilyMemberHistory extends DomainResource {
throw new FHIRException("Unknown FamilyHistoryStatus code '" + codeString + "'");
}
public String toCode(FamilyHistoryStatus code) {
if (code == FamilyHistoryStatus.PARTIAL)
public String toCode(FamilyHistoryStatus code)
{
if (code == FamilyHistoryStatus.NULL)
return null;
if (code == FamilyHistoryStatus.PARTIAL)
return "partial";
if (code == FamilyHistoryStatus.COMPLETED)
return "completed";
@ -201,7 +204,7 @@ public class FamilyMemberHistory extends DomainResource {
if (code == FamilyHistoryStatus.HEALTHUNKNOWN)
return "health-unknown";
return "?";
}
}
}
@Block()

View File

@ -166,15 +166,18 @@ public class Flag extends DomainResource {
throw new FHIRException("Unknown FlagStatus code '" + codeString + "'");
}
public String toCode(FlagStatus code) {
if (code == FlagStatus.ACTIVE)
public String toCode(FlagStatus code)
{
if (code == FlagStatus.NULL)
return null;
if (code == FlagStatus.ACTIVE)
return "active";
if (code == FlagStatus.INACTIVE)
return "inactive";
if (code == FlagStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
/**

View File

@ -283,8 +283,11 @@ public class Goal extends DomainResource {
throw new FHIRException("Unknown GoalStatus code '" + codeString + "'");
}
public String toCode(GoalStatus code) {
if (code == GoalStatus.PROPOSED)
public String toCode(GoalStatus code)
{
if (code == GoalStatus.NULL)
return null;
if (code == GoalStatus.PROPOSED)
return "proposed";
if (code == GoalStatus.PLANNED)
return "planned";
@ -303,7 +306,7 @@ public class Goal extends DomainResource {
if (code == GoalStatus.CANCELLED)
return "cancelled";
return "?";
}
}
}
@Block()

View File

@ -225,8 +225,11 @@ public class Group extends DomainResource {
throw new FHIRException("Unknown GroupType code '" + codeString + "'");
}
public String toCode(GroupType code) {
if (code == GroupType.PERSON)
public String toCode(GroupType code)
{
if (code == GroupType.NULL)
return null;
if (code == GroupType.PERSON)
return "person";
if (code == GroupType.ANIMAL)
return "animal";
@ -239,7 +242,7 @@ public class Group extends DomainResource {
if (code == GroupType.SUBSTANCE)
return "substance";
return "?";
}
}
}
@Block()

View File

@ -240,8 +240,11 @@ public class HealthcareService extends DomainResource {
throw new FHIRException("Unknown DaysOfWeek code '" + codeString + "'");
}
public String toCode(DaysOfWeek code) {
if (code == DaysOfWeek.MON)
public String toCode(DaysOfWeek code)
{
if (code == DaysOfWeek.NULL)
return null;
if (code == DaysOfWeek.MON)
return "mon";
if (code == DaysOfWeek.TUE)
return "tue";
@ -256,7 +259,7 @@ public class HealthcareService extends DomainResource {
if (code == DaysOfWeek.SUN)
return "sun";
return "?";
}
}
}
@Block()

View File

@ -249,8 +249,11 @@ public class HumanName extends Type implements ICompositeType {
throw new FHIRException("Unknown NameUse code '" + codeString + "'");
}
public String toCode(NameUse code) {
if (code == NameUse.USUAL)
public String toCode(NameUse code)
{
if (code == NameUse.NULL)
return null;
if (code == NameUse.USUAL)
return "usual";
if (code == NameUse.OFFICIAL)
return "official";
@ -265,7 +268,7 @@ public class HumanName extends Type implements ICompositeType {
if (code == NameUse.MAIDEN)
return "maiden";
return "?";
}
}
}
/**

View File

@ -186,8 +186,11 @@ public class Identifier extends Type implements ICompositeType {
throw new FHIRException("Unknown IdentifierUse code '" + codeString + "'");
}
public String toCode(IdentifierUse code) {
if (code == IdentifierUse.USUAL)
public String toCode(IdentifierUse code)
{
if (code == IdentifierUse.NULL)
return null;
if (code == IdentifierUse.USUAL)
return "usual";
if (code == IdentifierUse.OFFICIAL)
return "official";
@ -196,7 +199,7 @@ public class Identifier extends Type implements ICompositeType {
if (code == IdentifierUse.SECONDARY)
return "secondary";
return "?";
}
}
}
/**

View File

@ -191,8 +191,11 @@ public class ImagingStudy extends DomainResource {
throw new FHIRException("Unknown InstanceAvailability code '" + codeString + "'");
}
public String toCode(InstanceAvailability code) {
if (code == InstanceAvailability.ONLINE)
public String toCode(InstanceAvailability code)
{
if (code == InstanceAvailability.NULL)
return null;
if (code == InstanceAvailability.ONLINE)
return "ONLINE";
if (code == InstanceAvailability.OFFLINE)
return "OFFLINE";
@ -201,7 +204,7 @@ public class ImagingStudy extends DomainResource {
if (code == InstanceAvailability.UNAVAILABLE)
return "UNAVAILABLE";
return "?";
}
}
}
@Block()

View File

@ -155,13 +155,16 @@ public class ImplementationGuide extends DomainResource {
throw new FHIRException("Unknown GuideDependencyType code '" + codeString + "'");
}
public String toCode(GuideDependencyType code) {
if (code == GuideDependencyType.REFERENCE)
public String toCode(GuideDependencyType code)
{
if (code == GuideDependencyType.NULL)
return null;
if (code == GuideDependencyType.REFERENCE)
return "reference";
if (code == GuideDependencyType.INCLUSION)
return "inclusion";
return "?";
}
}
}
public enum GuideResourcePurpose {
@ -342,8 +345,11 @@ public class ImplementationGuide extends DomainResource {
throw new FHIRException("Unknown GuideResourcePurpose code '" + codeString + "'");
}
public String toCode(GuideResourcePurpose code) {
if (code == GuideResourcePurpose.EXAMPLE)
public String toCode(GuideResourcePurpose code)
{
if (code == GuideResourcePurpose.NULL)
return null;
if (code == GuideResourcePurpose.EXAMPLE)
return "example";
if (code == GuideResourcePurpose.TERMINOLOGY)
return "terminology";
@ -356,7 +362,7 @@ public class ImplementationGuide extends DomainResource {
if (code == GuideResourcePurpose.LOGICAL)
return "logical";
return "?";
}
}
}
public enum GuidePageKind {
@ -572,8 +578,11 @@ public class ImplementationGuide extends DomainResource {
throw new FHIRException("Unknown GuidePageKind code '" + codeString + "'");
}
public String toCode(GuidePageKind code) {
if (code == GuidePageKind.PAGE)
public String toCode(GuidePageKind code)
{
if (code == GuidePageKind.NULL)
return null;
if (code == GuidePageKind.PAGE)
return "page";
if (code == GuidePageKind.EXAMPLE)
return "example";
@ -590,7 +599,7 @@ public class ImplementationGuide extends DomainResource {
if (code == GuidePageKind.RESOURCE)
return "resource";
return "?";
}
}
}
@Block()

View File

@ -169,15 +169,18 @@ public class List_ extends DomainResource {
throw new FHIRException("Unknown ListStatus code '" + codeString + "'");
}
public String toCode(ListStatus code) {
if (code == ListStatus.CURRENT)
public String toCode(ListStatus code)
{
if (code == ListStatus.NULL)
return null;
if (code == ListStatus.CURRENT)
return "current";
if (code == ListStatus.RETIRED)
return "retired";
if (code == ListStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
public enum ListMode {
@ -301,15 +304,18 @@ public class List_ extends DomainResource {
throw new FHIRException("Unknown ListMode code '" + codeString + "'");
}
public String toCode(ListMode code) {
if (code == ListMode.WORKING)
public String toCode(ListMode code)
{
if (code == ListMode.NULL)
return null;
if (code == ListMode.WORKING)
return "working";
if (code == ListMode.SNAPSHOT)
return "snapshot";
if (code == ListMode.CHANGES)
return "changes";
return "?";
}
}
}
@Block()

View File

@ -172,15 +172,18 @@ public class Location extends DomainResource {
throw new FHIRException("Unknown LocationStatus code '" + codeString + "'");
}
public String toCode(LocationStatus code) {
if (code == LocationStatus.ACTIVE)
public String toCode(LocationStatus code)
{
if (code == LocationStatus.NULL)
return null;
if (code == LocationStatus.ACTIVE)
return "active";
if (code == LocationStatus.SUSPENDED)
return "suspended";
if (code == LocationStatus.INACTIVE)
return "inactive";
return "?";
}
}
}
public enum LocationMode {
@ -288,13 +291,16 @@ public class Location extends DomainResource {
throw new FHIRException("Unknown LocationMode code '" + codeString + "'");
}
public String toCode(LocationMode code) {
if (code == LocationMode.INSTANCE)
public String toCode(LocationMode code)
{
if (code == LocationMode.NULL)
return null;
if (code == LocationMode.INSTANCE)
return "instance";
if (code == LocationMode.KIND)
return "kind";
return "?";
}
}
}
@Block()

View File

@ -168,15 +168,18 @@ public class Media extends DomainResource {
throw new FHIRException("Unknown DigitalMediaType code '" + codeString + "'");
}
public String toCode(DigitalMediaType code) {
if (code == DigitalMediaType.PHOTO)
public String toCode(DigitalMediaType code)
{
if (code == DigitalMediaType.NULL)
return null;
if (code == DigitalMediaType.PHOTO)
return "photo";
if (code == DigitalMediaType.VIDEO)
return "video";
if (code == DigitalMediaType.AUDIO)
return "audio";
return "?";
}
}
}
/**

View File

@ -210,8 +210,11 @@ public class MedicationAdministration extends DomainResource {
throw new FHIRException("Unknown MedicationAdministrationStatus code '" + codeString + "'");
}
public String toCode(MedicationAdministrationStatus code) {
if (code == MedicationAdministrationStatus.INPROGRESS)
public String toCode(MedicationAdministrationStatus code)
{
if (code == MedicationAdministrationStatus.NULL)
return null;
if (code == MedicationAdministrationStatus.INPROGRESS)
return "in-progress";
if (code == MedicationAdministrationStatus.ONHOLD)
return "on-hold";
@ -222,7 +225,7 @@ public class MedicationAdministration extends DomainResource {
if (code == MedicationAdministrationStatus.STOPPED)
return "stopped";
return "?";
}
}
}
@Block()

View File

@ -211,8 +211,11 @@ public class MedicationDispense extends DomainResource {
throw new FHIRException("Unknown MedicationDispenseStatus code '" + codeString + "'");
}
public String toCode(MedicationDispenseStatus code) {
if (code == MedicationDispenseStatus.INPROGRESS)
public String toCode(MedicationDispenseStatus code)
{
if (code == MedicationDispenseStatus.NULL)
return null;
if (code == MedicationDispenseStatus.INPROGRESS)
return "in-progress";
if (code == MedicationDispenseStatus.ONHOLD)
return "on-hold";
@ -223,7 +226,7 @@ public class MedicationDispense extends DomainResource {
if (code == MedicationDispenseStatus.STOPPED)
return "stopped";
return "?";
}
}
}
@Block()

View File

@ -231,8 +231,11 @@ public class MedicationOrder extends DomainResource {
throw new FHIRException("Unknown MedicationOrderStatus code '" + codeString + "'");
}
public String toCode(MedicationOrderStatus code) {
if (code == MedicationOrderStatus.ACTIVE)
public String toCode(MedicationOrderStatus code)
{
if (code == MedicationOrderStatus.NULL)
return null;
if (code == MedicationOrderStatus.ACTIVE)
return "active";
if (code == MedicationOrderStatus.ONHOLD)
return "on-hold";
@ -245,7 +248,7 @@ public class MedicationOrder extends DomainResource {
if (code == MedicationOrderStatus.DRAFT)
return "draft";
return "?";
}
}
}
@Block()

View File

@ -208,8 +208,11 @@ public class MedicationStatement extends DomainResource {
throw new FHIRException("Unknown MedicationStatementStatus code '" + codeString + "'");
}
public String toCode(MedicationStatementStatus code) {
if (code == MedicationStatementStatus.ACTIVE)
public String toCode(MedicationStatementStatus code)
{
if (code == MedicationStatementStatus.NULL)
return null;
if (code == MedicationStatementStatus.ACTIVE)
return "active";
if (code == MedicationStatementStatus.COMPLETED)
return "completed";
@ -218,7 +221,7 @@ public class MedicationStatement extends DomainResource {
if (code == MedicationStatementStatus.INTENDED)
return "intended";
return "?";
}
}
}
@Block()

View File

@ -176,15 +176,18 @@ public class MessageHeader extends DomainResource {
throw new FHIRException("Unknown ResponseType code '" + codeString + "'");
}
public String toCode(ResponseType code) {
if (code == ResponseType.OK)
public String toCode(ResponseType code)
{
if (code == ResponseType.NULL)
return null;
if (code == ResponseType.OK)
return "ok";
if (code == ResponseType.TRANSIENTERROR)
return "transient-error";
if (code == ResponseType.FATALERROR)
return "fatal-error";
return "?";
}
}
}
@Block()

View File

@ -176,15 +176,18 @@ public class NamingSystem extends DomainResource {
throw new FHIRException("Unknown NamingSystemType code '" + codeString + "'");
}
public String toCode(NamingSystemType code) {
if (code == NamingSystemType.CODESYSTEM)
public String toCode(NamingSystemType code)
{
if (code == NamingSystemType.NULL)
return null;
if (code == NamingSystemType.CODESYSTEM)
return "codesystem";
if (code == NamingSystemType.IDENTIFIER)
return "identifier";
if (code == NamingSystemType.ROOT)
return "root";
return "?";
}
}
}
public enum NamingSystemIdentifierType {
@ -328,8 +331,11 @@ public class NamingSystem extends DomainResource {
throw new FHIRException("Unknown NamingSystemIdentifierType code '" + codeString + "'");
}
public String toCode(NamingSystemIdentifierType code) {
if (code == NamingSystemIdentifierType.OID)
public String toCode(NamingSystemIdentifierType code)
{
if (code == NamingSystemIdentifierType.NULL)
return null;
if (code == NamingSystemIdentifierType.OID)
return "oid";
if (code == NamingSystemIdentifierType.UUID)
return "uuid";
@ -338,7 +344,7 @@ public class NamingSystem extends DomainResource {
if (code == NamingSystemIdentifierType.OTHER)
return "other";
return "?";
}
}
}
@Block()

View File

@ -187,8 +187,11 @@ public class Narrative extends BaseNarrative implements INarrative {
throw new FHIRException("Unknown NarrativeStatus code '" + codeString + "'");
}
public String toCode(NarrativeStatus code) {
if (code == NarrativeStatus.GENERATED)
public String toCode(NarrativeStatus code)
{
if (code == NarrativeStatus.NULL)
return null;
if (code == NarrativeStatus.GENERATED)
return "generated";
if (code == NarrativeStatus.EXTENSIONS)
return "extensions";
@ -197,7 +200,7 @@ public class Narrative extends BaseNarrative implements INarrative {
if (code == NarrativeStatus.EMPTY)
return "empty";
return "?";
}
}
}
/**

View File

@ -263,8 +263,11 @@ public class NutritionOrder extends DomainResource {
throw new FHIRException("Unknown NutritionOrderStatus code '" + codeString + "'");
}
public String toCode(NutritionOrderStatus code) {
if (code == NutritionOrderStatus.PROPOSED)
public String toCode(NutritionOrderStatus code)
{
if (code == NutritionOrderStatus.NULL)
return null;
if (code == NutritionOrderStatus.PROPOSED)
return "proposed";
if (code == NutritionOrderStatus.DRAFT)
return "draft";
@ -281,7 +284,7 @@ public class NutritionOrder extends DomainResource {
if (code == NutritionOrderStatus.CANCELLED)
return "cancelled";
return "?";
}
}
}
@Block()

View File

@ -248,8 +248,11 @@ public class Observation extends DomainResource {
throw new FHIRException("Unknown ObservationStatus code '" + codeString + "'");
}
public String toCode(ObservationStatus code) {
if (code == ObservationStatus.REGISTERED)
public String toCode(ObservationStatus code)
{
if (code == ObservationStatus.NULL)
return null;
if (code == ObservationStatus.REGISTERED)
return "registered";
if (code == ObservationStatus.PRELIMINARY)
return "preliminary";
@ -264,7 +267,7 @@ public class Observation extends DomainResource {
if (code == ObservationStatus.UNKNOWN)
return "unknown";
return "?";
}
}
}
public enum ObservationRelationshipType {
@ -451,8 +454,11 @@ public class Observation extends DomainResource {
throw new FHIRException("Unknown ObservationRelationshipType code '" + codeString + "'");
}
public String toCode(ObservationRelationshipType code) {
if (code == ObservationRelationshipType.HASMEMBER)
public String toCode(ObservationRelationshipType code)
{
if (code == ObservationRelationshipType.NULL)
return null;
if (code == ObservationRelationshipType.HASMEMBER)
return "has-member";
if (code == ObservationRelationshipType.DERIVEDFROM)
return "derived-from";
@ -465,7 +471,7 @@ public class Observation extends DomainResource {
if (code == ObservationRelationshipType.INTERFEREDBY)
return "interfered-by";
return "?";
}
}
}
@Block()

View File

@ -156,13 +156,16 @@ public class OperationDefinition extends DomainResource {
throw new FHIRException("Unknown OperationKind code '" + codeString + "'");
}
public String toCode(OperationKind code) {
if (code == OperationKind.OPERATION)
public String toCode(OperationKind code)
{
if (code == OperationKind.NULL)
return null;
if (code == OperationKind.OPERATION)
return "operation";
if (code == OperationKind.QUERY)
return "query";
return "?";
}
}
}
public enum OperationParameterUse {
@ -267,13 +270,16 @@ public class OperationDefinition extends DomainResource {
throw new FHIRException("Unknown OperationParameterUse code '" + codeString + "'");
}
public String toCode(OperationParameterUse code) {
if (code == OperationParameterUse.IN)
public String toCode(OperationParameterUse code)
{
if (code == OperationParameterUse.NULL)
return null;
if (code == OperationParameterUse.IN)
return "in";
if (code == OperationParameterUse.OUT)
return "out";
return "?";
}
}
}
@Block()

View File

@ -189,8 +189,11 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
throw new FHIRException("Unknown IssueSeverity code '" + codeString + "'");
}
public String toCode(IssueSeverity code) {
if (code == IssueSeverity.FATAL)
public String toCode(IssueSeverity code)
{
if (code == IssueSeverity.NULL)
return null;
if (code == IssueSeverity.FATAL)
return "fatal";
if (code == IssueSeverity.ERROR)
return "error";
@ -199,7 +202,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
if (code == IssueSeverity.INFORMATION)
return "information";
return "?";
}
}
}
public enum IssueType {
@ -810,8 +813,11 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
throw new FHIRException("Unknown IssueType code '" + codeString + "'");
}
public String toCode(IssueType code) {
if (code == IssueType.INVALID)
public String toCode(IssueType code)
{
if (code == IssueType.NULL)
return null;
if (code == IssueType.INVALID)
return "invalid";
if (code == IssueType.STRUCTURE)
return "structure";
@ -870,7 +876,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
if (code == IssueType.INFORMATIONAL)
return "informational";
return "?";
}
}
}
@Block()

View File

@ -278,8 +278,11 @@ public class OrderResponse extends DomainResource {
throw new FHIRException("Unknown OrderStatus code '" + codeString + "'");
}
public String toCode(OrderStatus code) {
if (code == OrderStatus.PENDING)
public String toCode(OrderStatus code)
{
if (code == OrderStatus.NULL)
return null;
if (code == OrderStatus.PENDING)
return "pending";
if (code == OrderStatus.REVIEW)
return "review";
@ -298,7 +301,7 @@ public class OrderResponse extends DomainResource {
if (code == OrderStatus.COMPLETED)
return "completed";
return "?";
}
}
}
/**

View File

@ -180,15 +180,18 @@ public class Patient extends DomainResource {
throw new FHIRException("Unknown LinkType code '" + codeString + "'");
}
public String toCode(LinkType code) {
if (code == LinkType.REPLACE)
public String toCode(LinkType code)
{
if (code == LinkType.NULL)
return null;
if (code == LinkType.REPLACE)
return "replace";
if (code == LinkType.REFER)
return "refer";
if (code == LinkType.SEEALSO)
return "seealso";
return "?";
}
}
}
@Block()

View File

@ -189,8 +189,11 @@ public class Person extends DomainResource {
throw new FHIRException("Unknown IdentityAssuranceLevel code '" + codeString + "'");
}
public String toCode(IdentityAssuranceLevel code) {
if (code == IdentityAssuranceLevel.LEVEL1)
public String toCode(IdentityAssuranceLevel code)
{
if (code == IdentityAssuranceLevel.NULL)
return null;
if (code == IdentityAssuranceLevel.LEVEL1)
return "level1";
if (code == IdentityAssuranceLevel.LEVEL2)
return "level2";
@ -199,7 +202,7 @@ public class Person extends DomainResource {
if (code == IdentityAssuranceLevel.LEVEL4)
return "level4";
return "?";
}
}
}
@Block()

View File

@ -187,8 +187,11 @@ public class Procedure extends DomainResource {
throw new FHIRException("Unknown ProcedureStatus code '" + codeString + "'");
}
public String toCode(ProcedureStatus code) {
if (code == ProcedureStatus.INPROGRESS)
public String toCode(ProcedureStatus code)
{
if (code == ProcedureStatus.NULL)
return null;
if (code == ProcedureStatus.INPROGRESS)
return "in-progress";
if (code == ProcedureStatus.ABORTED)
return "aborted";
@ -197,7 +200,7 @@ public class Procedure extends DomainResource {
if (code == ProcedureStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
@Block()

View File

@ -296,8 +296,11 @@ public class ProcedureRequest extends DomainResource {
throw new FHIRException("Unknown ProcedureRequestStatus code '" + codeString + "'");
}
public String toCode(ProcedureRequestStatus code) {
if (code == ProcedureRequestStatus.PROPOSED)
public String toCode(ProcedureRequestStatus code)
{
if (code == ProcedureRequestStatus.NULL)
return null;
if (code == ProcedureRequestStatus.PROPOSED)
return "proposed";
if (code == ProcedureRequestStatus.DRAFT)
return "draft";
@ -318,7 +321,7 @@ public class ProcedureRequest extends DomainResource {
if (code == ProcedureRequestStatus.ABORTED)
return "aborted";
return "?";
}
}
}
public enum ProcedureRequestPriority {
@ -459,8 +462,11 @@ public class ProcedureRequest extends DomainResource {
throw new FHIRException("Unknown ProcedureRequestPriority code '" + codeString + "'");
}
public String toCode(ProcedureRequestPriority code) {
if (code == ProcedureRequestPriority.ROUTINE)
public String toCode(ProcedureRequestPriority code)
{
if (code == ProcedureRequestPriority.NULL)
return null;
if (code == ProcedureRequestPriority.ROUTINE)
return "routine";
if (code == ProcedureRequestPriority.URGENT)
return "urgent";
@ -469,7 +475,7 @@ public class ProcedureRequest extends DomainResource {
if (code == ProcedureRequestPriority.ASAP)
return "asap";
return "?";
}
}
}
/**

View File

@ -188,8 +188,11 @@ public class ProcessRequest extends DomainResource {
throw new FHIRException("Unknown ActionList code '" + codeString + "'");
}
public String toCode(ActionList code) {
if (code == ActionList.CANCEL)
public String toCode(ActionList code)
{
if (code == ActionList.NULL)
return null;
if (code == ActionList.CANCEL)
return "cancel";
if (code == ActionList.POLL)
return "poll";
@ -198,7 +201,7 @@ public class ProcessRequest extends DomainResource {
if (code == ActionList.STATUS)
return "status";
return "?";
}
}
}
@Block()

View File

@ -202,8 +202,11 @@ public class Provenance extends DomainResource {
throw new FHIRException("Unknown ProvenanceEntityRole code '" + codeString + "'");
}
public String toCode(ProvenanceEntityRole code) {
if (code == ProvenanceEntityRole.DERIVATION)
public String toCode(ProvenanceEntityRole code)
{
if (code == ProvenanceEntityRole.NULL)
return null;
if (code == ProvenanceEntityRole.DERIVATION)
return "derivation";
if (code == ProvenanceEntityRole.REVISION)
return "revision";
@ -212,7 +215,7 @@ public class Provenance extends DomainResource {
if (code == ProvenanceEntityRole.SOURCE)
return "source";
return "?";
}
}
}
@Block()

View File

@ -187,8 +187,11 @@ public class Quantity extends Type implements ICompositeType {
throw new FHIRException("Unknown QuantityComparator code '" + codeString + "'");
}
public String toCode(QuantityComparator code) {
if (code == QuantityComparator.LESS_THAN)
public String toCode(QuantityComparator code)
{
if (code == QuantityComparator.NULL)
return null;
if (code == QuantityComparator.LESS_THAN)
return "<";
if (code == QuantityComparator.LESS_OR_EQUAL)
return "<=";
@ -197,7 +200,7 @@ public class Quantity extends Type implements ICompositeType {
if (code == QuantityComparator.GREATER_THAN)
return ">";
return "?";
}
}
}
/**

View File

@ -171,15 +171,18 @@ public class Questionnaire extends DomainResource {
throw new FHIRException("Unknown QuestionnaireStatus code '" + codeString + "'");
}
public String toCode(QuestionnaireStatus code) {
if (code == QuestionnaireStatus.DRAFT)
public String toCode(QuestionnaireStatus code)
{
if (code == QuestionnaireStatus.NULL)
return null;
if (code == QuestionnaireStatus.DRAFT)
return "draft";
if (code == QuestionnaireStatus.PUBLISHED)
return "published";
if (code == QuestionnaireStatus.RETIRED)
return "retired";
return "?";
}
}
}
public enum AnswerFormat {
@ -520,8 +523,11 @@ public class Questionnaire extends DomainResource {
throw new FHIRException("Unknown AnswerFormat code '" + codeString + "'");
}
public String toCode(AnswerFormat code) {
if (code == AnswerFormat.BOOLEAN)
public String toCode(AnswerFormat code)
{
if (code == AnswerFormat.NULL)
return null;
if (code == AnswerFormat.BOOLEAN)
return "boolean";
if (code == AnswerFormat.DECIMAL)
return "decimal";
@ -552,7 +558,7 @@ public class Questionnaire extends DomainResource {
if (code == AnswerFormat.QUANTITY)
return "quantity";
return "?";
}
}
}
@Block()

View File

@ -174,15 +174,18 @@ public class QuestionnaireResponse extends DomainResource {
throw new FHIRException("Unknown QuestionnaireResponseStatus code '" + codeString + "'");
}
public String toCode(QuestionnaireResponseStatus code) {
if (code == QuestionnaireResponseStatus.INPROGRESS)
public String toCode(QuestionnaireResponseStatus code)
{
if (code == QuestionnaireResponseStatus.NULL)
return null;
if (code == QuestionnaireResponseStatus.INPROGRESS)
return "in-progress";
if (code == QuestionnaireResponseStatus.COMPLETED)
return "completed";
if (code == QuestionnaireResponseStatus.AMENDED)
return "amended";
return "?";
}
}
}
@Block()

View File

@ -243,8 +243,11 @@ public class ReferralRequest extends DomainResource {
throw new FHIRException("Unknown ReferralStatus code '" + codeString + "'");
}
public String toCode(ReferralStatus code) {
if (code == ReferralStatus.DRAFT)
public String toCode(ReferralStatus code)
{
if (code == ReferralStatus.NULL)
return null;
if (code == ReferralStatus.DRAFT)
return "draft";
if (code == ReferralStatus.REQUESTED)
return "requested";
@ -259,7 +262,7 @@ public class ReferralRequest extends DomainResource {
if (code == ReferralStatus.COMPLETED)
return "completed";
return "?";
}
}
}
/**

View File

@ -214,8 +214,11 @@ public class SearchParameter extends DomainResource {
throw new FHIRException("Unknown XPathUsageType code '" + codeString + "'");
}
public String toCode(XPathUsageType code) {
if (code == XPathUsageType.NORMAL)
public String toCode(XPathUsageType code)
{
if (code == XPathUsageType.NULL)
return null;
if (code == XPathUsageType.NORMAL)
return "normal";
if (code == XPathUsageType.PHONETIC)
return "phonetic";
@ -226,7 +229,7 @@ public class SearchParameter extends DomainResource {
if (code == XPathUsageType.OTHER)
return "other";
return "?";
}
}
}
@Block()

View File

@ -188,8 +188,11 @@ public class Slot extends DomainResource {
throw new FHIRException("Unknown SlotStatus code '" + codeString + "'");
}
public String toCode(SlotStatus code) {
if (code == SlotStatus.BUSY)
public String toCode(SlotStatus code)
{
if (code == SlotStatus.NULL)
return null;
if (code == SlotStatus.BUSY)
return "busy";
if (code == SlotStatus.FREE)
return "free";
@ -198,7 +201,7 @@ public class Slot extends DomainResource {
if (code == SlotStatus.BUSYTENTATIVE)
return "busy-tentative";
return "?";
}
}
}
/**

View File

@ -189,8 +189,11 @@ public class Specimen extends DomainResource {
throw new FHIRException("Unknown SpecimenStatus code '" + codeString + "'");
}
public String toCode(SpecimenStatus code) {
if (code == SpecimenStatus.AVAILABLE)
public String toCode(SpecimenStatus code)
{
if (code == SpecimenStatus.NULL)
return null;
if (code == SpecimenStatus.AVAILABLE)
return "available";
if (code == SpecimenStatus.UNAVAILABLE)
return "unavailable";
@ -199,7 +202,7 @@ public class Specimen extends DomainResource {
if (code == SpecimenStatus.ENTEREDINERROR)
return "entered-in-error";
return "?";
}
}
}
@Block()

View File

@ -176,15 +176,18 @@ public class StructureDefinition extends DomainResource {
throw new FHIRException("Unknown StructureDefinitionKind code '" + codeString + "'");
}
public String toCode(StructureDefinitionKind code) {
if (code == StructureDefinitionKind.DATATYPE)
public String toCode(StructureDefinitionKind code)
{
if (code == StructureDefinitionKind.NULL)
return null;
if (code == StructureDefinitionKind.DATATYPE)
return "datatype";
if (code == StructureDefinitionKind.RESOURCE)
return "resource";
if (code == StructureDefinitionKind.LOGICAL)
return "logical";
return "?";
}
}
}
public enum ExtensionContext {
@ -331,8 +334,11 @@ public class StructureDefinition extends DomainResource {
throw new FHIRException("Unknown ExtensionContext code '" + codeString + "'");
}
public String toCode(ExtensionContext code) {
if (code == ExtensionContext.RESOURCE)
public String toCode(ExtensionContext code)
{
if (code == ExtensionContext.NULL)
return null;
if (code == ExtensionContext.RESOURCE)
return "resource";
if (code == ExtensionContext.DATATYPE)
return "datatype";
@ -341,7 +347,7 @@ public class StructureDefinition extends DomainResource {
if (code == ExtensionContext.EXTENSION)
return "extension";
return "?";
}
}
}
@Block()

View File

@ -192,8 +192,11 @@ public class Subscription extends DomainResource {
throw new FHIRException("Unknown SubscriptionStatus code '" + codeString + "'");
}
public String toCode(SubscriptionStatus code) {
if (code == SubscriptionStatus.REQUESTED)
public String toCode(SubscriptionStatus code)
{
if (code == SubscriptionStatus.NULL)
return null;
if (code == SubscriptionStatus.REQUESTED)
return "requested";
if (code == SubscriptionStatus.ACTIVE)
return "active";
@ -202,7 +205,7 @@ public class Subscription extends DomainResource {
if (code == SubscriptionStatus.OFF)
return "off";
return "?";
}
}
}
public enum SubscriptionChannelType {
@ -368,8 +371,11 @@ public class Subscription extends DomainResource {
throw new FHIRException("Unknown SubscriptionChannelType code '" + codeString + "'");
}
public String toCode(SubscriptionChannelType code) {
if (code == SubscriptionChannelType.RESTHOOK)
public String toCode(SubscriptionChannelType code)
{
if (code == SubscriptionChannelType.NULL)
return null;
if (code == SubscriptionChannelType.RESTHOOK)
return "rest-hook";
if (code == SubscriptionChannelType.WEBSOCKET)
return "websocket";
@ -380,7 +386,7 @@ public class Subscription extends DomainResource {
if (code == SubscriptionChannelType.MESSAGE)
return "message";
return "?";
}
}
}
@Block()

View File

@ -166,15 +166,18 @@ public class SupplyDelivery extends DomainResource {
throw new FHIRException("Unknown SupplyDeliveryStatus code '" + codeString + "'");
}
public String toCode(SupplyDeliveryStatus code) {
if (code == SupplyDeliveryStatus.INPROGRESS)
public String toCode(SupplyDeliveryStatus code)
{
if (code == SupplyDeliveryStatus.NULL)
return null;
if (code == SupplyDeliveryStatus.INPROGRESS)
return "in-progress";
if (code == SupplyDeliveryStatus.COMPLETED)
return "completed";
if (code == SupplyDeliveryStatus.ABANDONED)
return "abandoned";
return "?";
}
}
}
/**

View File

@ -188,8 +188,11 @@ public class SupplyRequest extends DomainResource {
throw new FHIRException("Unknown SupplyRequestStatus code '" + codeString + "'");
}
public String toCode(SupplyRequestStatus code) {
if (code == SupplyRequestStatus.REQUESTED)
public String toCode(SupplyRequestStatus code)
{
if (code == SupplyRequestStatus.NULL)
return null;
if (code == SupplyRequestStatus.REQUESTED)
return "requested";
if (code == SupplyRequestStatus.COMPLETED)
return "completed";
@ -198,7 +201,7 @@ public class SupplyRequest extends DomainResource {
if (code == SupplyRequestStatus.CANCELLED)
return "cancelled";
return "?";
}
}
}
@Block()

View File

@ -154,13 +154,16 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown ContentType code '" + codeString + "'");
}
public String toCode(ContentType code) {
if (code == ContentType.XML)
public String toCode(ContentType code)
{
if (code == ContentType.NULL)
return null;
if (code == ContentType.XML)
return "xml";
if (code == ContentType.JSON)
return "json";
return "?";
}
}
}
public enum AssertionDirectionType {
@ -265,13 +268,16 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown AssertionDirectionType code '" + codeString + "'");
}
public String toCode(AssertionDirectionType code) {
if (code == AssertionDirectionType.RESPONSE)
public String toCode(AssertionDirectionType code)
{
if (code == AssertionDirectionType.NULL)
return null;
if (code == AssertionDirectionType.RESPONSE)
return "response";
if (code == AssertionDirectionType.REQUEST)
return "request";
return "?";
}
}
}
public enum AssertionOperatorType {
@ -520,8 +526,11 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown AssertionOperatorType code '" + codeString + "'");
}
public String toCode(AssertionOperatorType code) {
if (code == AssertionOperatorType.EQUALS)
public String toCode(AssertionOperatorType code)
{
if (code == AssertionOperatorType.NULL)
return null;
if (code == AssertionOperatorType.EQUALS)
return "equals";
if (code == AssertionOperatorType.NOTEQUALS)
return "notEquals";
@ -542,7 +551,7 @@ public class TestScript extends DomainResource {
if (code == AssertionOperatorType.NOTCONTAINS)
return "notContains";
return "?";
}
}
}
public enum AssertionResponseTypes {
@ -827,8 +836,11 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown AssertionResponseTypes code '" + codeString + "'");
}
public String toCode(AssertionResponseTypes code) {
if (code == AssertionResponseTypes.OKAY)
public String toCode(AssertionResponseTypes code)
{
if (code == AssertionResponseTypes.NULL)
return null;
if (code == AssertionResponseTypes.OKAY)
return "okay";
if (code == AssertionResponseTypes.CREATED)
return "created";
@ -853,7 +865,7 @@ public class TestScript extends DomainResource {
if (code == AssertionResponseTypes.UNPROCESSABLE)
return "unprocessable";
return "?";
}
}
}
@Block()

View File

@ -245,8 +245,11 @@ public class Timing extends Type implements ICompositeType {
throw new FHIRException("Unknown UnitsOfTime code '" + codeString + "'");
}
public String toCode(UnitsOfTime code) {
if (code == UnitsOfTime.S)
public String toCode(UnitsOfTime code)
{
if (code == UnitsOfTime.NULL)
return null;
if (code == UnitsOfTime.S)
return "s";
if (code == UnitsOfTime.MIN)
return "min";
@ -261,7 +264,7 @@ public class Timing extends Type implements ICompositeType {
if (code == UnitsOfTime.A)
return "a";
return "?";
}
}
}
public enum EventTiming {
@ -582,8 +585,11 @@ public class Timing extends Type implements ICompositeType {
throw new FHIRException("Unknown EventTiming code '" + codeString + "'");
}
public String toCode(EventTiming code) {
if (code == EventTiming.HS)
public String toCode(EventTiming code)
{
if (code == EventTiming.NULL)
return null;
if (code == EventTiming.HS)
return "HS";
if (code == EventTiming.WAKE)
return "WAKE";
@ -612,7 +618,7 @@ public class Timing extends Type implements ICompositeType {
if (code == EventTiming.PCV)
return "PCV";
return "?";
}
}
}
@Block()

View File

@ -230,8 +230,11 @@ public class ValueSet extends DomainResource {
throw new FHIRException("Unknown FilterOperator code '" + codeString + "'");
}
public String toCode(FilterOperator code) {
if (code == FilterOperator.EQUAL)
public String toCode(FilterOperator code)
{
if (code == FilterOperator.NULL)
return null;
if (code == FilterOperator.EQUAL)
return "=";
if (code == FilterOperator.ISA)
return "is-a";
@ -244,7 +247,7 @@ public class ValueSet extends DomainResource {
if (code == FilterOperator.NOTIN)
return "not-in";
return "?";
}
}
}
@Block()

View File

@ -154,13 +154,16 @@ public class VisionPrescription extends DomainResource {
throw new FHIRException("Unknown VisionEyes code '" + codeString + "'");
}
public String toCode(VisionEyes code) {
if (code == VisionEyes.RIGHT)
public String toCode(VisionEyes code)
{
if (code == VisionEyes.NULL)
return null;
if (code == VisionEyes.RIGHT)
return "right";
if (code == VisionEyes.LEFT)
return "left";
return "?";
}
}
}
public enum VisionBase {
@ -301,8 +304,11 @@ public class VisionPrescription extends DomainResource {
throw new FHIRException("Unknown VisionBase code '" + codeString + "'");
}
public String toCode(VisionBase code) {
if (code == VisionBase.UP)
public String toCode(VisionBase code)
{
if (code == VisionBase.NULL)
return null;
if (code == VisionBase.UP)
return "up";
if (code == VisionBase.DOWN)
return "down";
@ -311,7 +317,7 @@ public class VisionPrescription extends DomainResource {
if (code == VisionBase.OUT)
return "out";
return "?";
}
}
}
@Block()