Return null for all toCode enum params that are Enum.NULL (dstu3)

This commit is contained in:
dotasek 2024-07-19 11:39:46 -04:00
parent 704ba35073
commit ea0a158ae8
683 changed files with 4260 additions and 2634 deletions

View File

@ -149,14 +149,16 @@ public class Account extends DomainResource {
throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); throw new FHIRException("Unknown AccountStatus code '"+codeString+"'");
} }
public String toCode(AccountStatus code) { public String toCode(AccountStatus code) {
if (code == AccountStatus.ACTIVE) if (code == AccountStatus.NULL)
return null;
if (code == AccountStatus.ACTIVE)
return "active"; return "active";
if (code == AccountStatus.INACTIVE) if (code == AccountStatus.INACTIVE)
return "inactive"; return "inactive";
if (code == AccountStatus.ENTEREDINERROR) if (code == AccountStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(AccountStatus code) { public String toSystem(AccountStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -1782,7 +1782,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown ActivityDefinitionKind code '"+codeString+"'"); throw new FHIRException("Unknown ActivityDefinitionKind code '"+codeString+"'");
} }
public String toCode(ActivityDefinitionKind code) { public String toCode(ActivityDefinitionKind code) {
if (code == ActivityDefinitionKind.ACCOUNT) if (code == ActivityDefinitionKind.NULL)
return null;
if (code == ActivityDefinitionKind.ACCOUNT)
return "Account"; return "Account";
if (code == ActivityDefinitionKind.ACTIVITYDEFINITION) if (code == ActivityDefinitionKind.ACTIVITYDEFINITION)
return "ActivityDefinition"; return "ActivityDefinition";
@ -2021,7 +2023,7 @@ The primary difference between a medication statement and a medication administr
if (code == ActivityDefinitionKind.VISIONPRESCRIPTION) if (code == ActivityDefinitionKind.VISIONPRESCRIPTION)
return "VisionPrescription"; return "VisionPrescription";
return "?"; return "?";
} }
public String toSystem(ActivityDefinitionKind code) { public String toSystem(ActivityDefinitionKind code) {
return code.getSystem(); return code.getSystem();
} }
@ -2126,14 +2128,16 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown ActivityParticipantType code '"+codeString+"'"); throw new FHIRException("Unknown ActivityParticipantType code '"+codeString+"'");
} }
public String toCode(ActivityParticipantType code) { public String toCode(ActivityParticipantType code) {
if (code == ActivityParticipantType.PATIENT) if (code == ActivityParticipantType.NULL)
return null;
if (code == ActivityParticipantType.PATIENT)
return "patient"; return "patient";
if (code == ActivityParticipantType.PRACTITIONER) if (code == ActivityParticipantType.PRACTITIONER)
return "practitioner"; return "practitioner";
if (code == ActivityParticipantType.RELATEDPERSON) if (code == ActivityParticipantType.RELATEDPERSON)
return "related-person"; return "related-person";
return "?"; return "?";
} }
public String toSystem(ActivityParticipantType code) { public String toSystem(ActivityParticipantType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -162,7 +162,9 @@ public class Address extends Type implements ICompositeType {
throw new FHIRException("Unknown AddressUse code '"+codeString+"'"); throw new FHIRException("Unknown AddressUse code '"+codeString+"'");
} }
public String toCode(AddressUse code) { public String toCode(AddressUse code) {
if (code == AddressUse.HOME) if (code == AddressUse.NULL)
return null;
if (code == AddressUse.HOME)
return "home"; return "home";
if (code == AddressUse.WORK) if (code == AddressUse.WORK)
return "work"; return "work";
@ -171,7 +173,7 @@ public class Address extends Type implements ICompositeType {
if (code == AddressUse.OLD) if (code == AddressUse.OLD)
return "old"; return "old";
return "?"; return "?";
} }
public String toSystem(AddressUse code) { public String toSystem(AddressUse code) {
return code.getSystem(); return code.getSystem();
} }
@ -276,14 +278,16 @@ public class Address extends Type implements ICompositeType {
throw new FHIRException("Unknown AddressType code '"+codeString+"'"); throw new FHIRException("Unknown AddressType code '"+codeString+"'");
} }
public String toCode(AddressType code) { public String toCode(AddressType code) {
if (code == AddressType.POSTAL) if (code == AddressType.NULL)
return null;
if (code == AddressType.POSTAL)
return "postal"; return "postal";
if (code == AddressType.PHYSICAL) if (code == AddressType.PHYSICAL)
return "physical"; return "physical";
if (code == AddressType.BOTH) if (code == AddressType.BOTH)
return "both"; return "both";
return "?"; return "?";
} }
public String toSystem(AddressType code) { public String toSystem(AddressType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -136,12 +136,14 @@ public class AdverseEvent extends DomainResource {
throw new FHIRException("Unknown AdverseEventCategory code '"+codeString+"'"); throw new FHIRException("Unknown AdverseEventCategory code '"+codeString+"'");
} }
public String toCode(AdverseEventCategory code) { public String toCode(AdverseEventCategory code) {
if (code == AdverseEventCategory.AE) if (code == AdverseEventCategory.NULL)
return null;
if (code == AdverseEventCategory.AE)
return "AE"; return "AE";
if (code == AdverseEventCategory.PAE) if (code == AdverseEventCategory.PAE)
return "PAE"; return "PAE";
return "?"; return "?";
} }
public String toSystem(AdverseEventCategory code) { public String toSystem(AdverseEventCategory code) {
return code.getSystem(); return code.getSystem();
} }
@ -232,12 +234,14 @@ public class AdverseEvent extends DomainResource {
throw new FHIRException("Unknown AdverseEventCausality code '"+codeString+"'"); throw new FHIRException("Unknown AdverseEventCausality code '"+codeString+"'");
} }
public String toCode(AdverseEventCausality code) { public String toCode(AdverseEventCausality code) {
if (code == AdverseEventCausality.CAUSALITY1) if (code == AdverseEventCausality.NULL)
return null;
if (code == AdverseEventCausality.CAUSALITY1)
return "causality1"; return "causality1";
if (code == AdverseEventCausality.CAUSALITY2) if (code == AdverseEventCausality.CAUSALITY2)
return "causality2"; return "causality2";
return "?"; return "?";
} }
public String toSystem(AdverseEventCausality code) { public String toSystem(AdverseEventCausality code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -151,14 +151,16 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceClinicalStatus code '"+codeString+"'"); throw new FHIRException("Unknown AllergyIntoleranceClinicalStatus code '"+codeString+"'");
} }
public String toCode(AllergyIntoleranceClinicalStatus code) { public String toCode(AllergyIntoleranceClinicalStatus code) {
if (code == AllergyIntoleranceClinicalStatus.ACTIVE) if (code == AllergyIntoleranceClinicalStatus.NULL)
return null;
if (code == AllergyIntoleranceClinicalStatus.ACTIVE)
return "active"; return "active";
if (code == AllergyIntoleranceClinicalStatus.INACTIVE) if (code == AllergyIntoleranceClinicalStatus.INACTIVE)
return "inactive"; return "inactive";
if (code == AllergyIntoleranceClinicalStatus.RESOLVED) if (code == AllergyIntoleranceClinicalStatus.RESOLVED)
return "resolved"; return "resolved";
return "?"; return "?";
} }
public String toSystem(AllergyIntoleranceClinicalStatus code) { public String toSystem(AllergyIntoleranceClinicalStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -277,7 +279,9 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceVerificationStatus code '"+codeString+"'"); throw new FHIRException("Unknown AllergyIntoleranceVerificationStatus code '"+codeString+"'");
} }
public String toCode(AllergyIntoleranceVerificationStatus code) { public String toCode(AllergyIntoleranceVerificationStatus code) {
if (code == AllergyIntoleranceVerificationStatus.UNCONFIRMED) if (code == AllergyIntoleranceVerificationStatus.NULL)
return null;
if (code == AllergyIntoleranceVerificationStatus.UNCONFIRMED)
return "unconfirmed"; return "unconfirmed";
if (code == AllergyIntoleranceVerificationStatus.CONFIRMED) if (code == AllergyIntoleranceVerificationStatus.CONFIRMED)
return "confirmed"; return "confirmed";
@ -286,7 +290,7 @@ public class AllergyIntolerance extends DomainResource {
if (code == AllergyIntoleranceVerificationStatus.ENTEREDINERROR) if (code == AllergyIntoleranceVerificationStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(AllergyIntoleranceVerificationStatus code) { public String toSystem(AllergyIntoleranceVerificationStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -377,12 +381,14 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceType code '"+codeString+"'"); throw new FHIRException("Unknown AllergyIntoleranceType code '"+codeString+"'");
} }
public String toCode(AllergyIntoleranceType code) { public String toCode(AllergyIntoleranceType code) {
if (code == AllergyIntoleranceType.ALLERGY) if (code == AllergyIntoleranceType.NULL)
return null;
if (code == AllergyIntoleranceType.ALLERGY)
return "allergy"; return "allergy";
if (code == AllergyIntoleranceType.INTOLERANCE) if (code == AllergyIntoleranceType.INTOLERANCE)
return "intolerance"; return "intolerance";
return "?"; return "?";
} }
public String toSystem(AllergyIntoleranceType code) { public String toSystem(AllergyIntoleranceType code) {
return code.getSystem(); return code.getSystem();
} }
@ -501,7 +507,9 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'");
} }
public String toCode(AllergyIntoleranceCategory code) { public String toCode(AllergyIntoleranceCategory code) {
if (code == AllergyIntoleranceCategory.FOOD) if (code == AllergyIntoleranceCategory.NULL)
return null;
if (code == AllergyIntoleranceCategory.FOOD)
return "food"; return "food";
if (code == AllergyIntoleranceCategory.MEDICATION) if (code == AllergyIntoleranceCategory.MEDICATION)
return "medication"; return "medication";
@ -510,7 +518,7 @@ public class AllergyIntolerance extends DomainResource {
if (code == AllergyIntoleranceCategory.BIOLOGIC) if (code == AllergyIntoleranceCategory.BIOLOGIC)
return "biologic"; return "biologic";
return "?"; return "?";
} }
public String toSystem(AllergyIntoleranceCategory code) { public String toSystem(AllergyIntoleranceCategory code) {
return code.getSystem(); return code.getSystem();
} }
@ -615,14 +623,16 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'");
} }
public String toCode(AllergyIntoleranceCriticality code) { public String toCode(AllergyIntoleranceCriticality code) {
if (code == AllergyIntoleranceCriticality.LOW) if (code == AllergyIntoleranceCriticality.NULL)
return null;
if (code == AllergyIntoleranceCriticality.LOW)
return "low"; return "low";
if (code == AllergyIntoleranceCriticality.HIGH) if (code == AllergyIntoleranceCriticality.HIGH)
return "high"; return "high";
if (code == AllergyIntoleranceCriticality.UNABLETOASSESS) if (code == AllergyIntoleranceCriticality.UNABLETOASSESS)
return "unable-to-assess"; return "unable-to-assess";
return "?"; return "?";
} }
public String toSystem(AllergyIntoleranceCriticality code) { public String toSystem(AllergyIntoleranceCriticality code) {
return code.getSystem(); return code.getSystem();
} }
@ -727,14 +737,16 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'"); throw new FHIRException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'");
} }
public String toCode(AllergyIntoleranceSeverity code) { public String toCode(AllergyIntoleranceSeverity code) {
if (code == AllergyIntoleranceSeverity.MILD) if (code == AllergyIntoleranceSeverity.NULL)
return null;
if (code == AllergyIntoleranceSeverity.MILD)
return "mild"; return "mild";
if (code == AllergyIntoleranceSeverity.MODERATE) if (code == AllergyIntoleranceSeverity.MODERATE)
return "moderate"; return "moderate";
if (code == AllergyIntoleranceSeverity.SEVERE) if (code == AllergyIntoleranceSeverity.SEVERE)
return "severe"; return "severe";
return "?"; return "?";
} }
public String toSystem(AllergyIntoleranceSeverity code) { public String toSystem(AllergyIntoleranceSeverity code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -220,7 +220,9 @@ public class Appointment extends DomainResource {
throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'");
} }
public String toCode(AppointmentStatus code) { public String toCode(AppointmentStatus code) {
if (code == AppointmentStatus.PROPOSED) if (code == AppointmentStatus.NULL)
return null;
if (code == AppointmentStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == AppointmentStatus.PENDING) if (code == AppointmentStatus.PENDING)
return "pending"; return "pending";
@ -237,7 +239,7 @@ public class Appointment extends DomainResource {
if (code == AppointmentStatus.ENTEREDINERROR) if (code == AppointmentStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(AppointmentStatus code) { public String toSystem(AppointmentStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -342,14 +344,16 @@ public class Appointment extends DomainResource {
throw new FHIRException("Unknown ParticipantRequired code '"+codeString+"'"); throw new FHIRException("Unknown ParticipantRequired code '"+codeString+"'");
} }
public String toCode(ParticipantRequired code) { public String toCode(ParticipantRequired code) {
if (code == ParticipantRequired.REQUIRED) if (code == ParticipantRequired.NULL)
return null;
if (code == ParticipantRequired.REQUIRED)
return "required"; return "required";
if (code == ParticipantRequired.OPTIONAL) if (code == ParticipantRequired.OPTIONAL)
return "optional"; return "optional";
if (code == ParticipantRequired.INFORMATIONONLY) if (code == ParticipantRequired.INFORMATIONONLY)
return "information-only"; return "information-only";
return "?"; return "?";
} }
public String toSystem(ParticipantRequired code) { public String toSystem(ParticipantRequired code) {
return code.getSystem(); return code.getSystem();
} }
@ -468,7 +472,9 @@ public class Appointment extends DomainResource {
throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'"); throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'");
} }
public String toCode(ParticipationStatus code) { public String toCode(ParticipationStatus code) {
if (code == ParticipationStatus.ACCEPTED) if (code == ParticipationStatus.NULL)
return null;
if (code == ParticipationStatus.ACCEPTED)
return "accepted"; return "accepted";
if (code == ParticipationStatus.DECLINED) if (code == ParticipationStatus.DECLINED)
return "declined"; return "declined";
@ -477,7 +483,7 @@ public class Appointment extends DomainResource {
if (code == ParticipationStatus.NEEDSACTION) if (code == ParticipationStatus.NEEDSACTION)
return "needs-action"; return "needs-action";
return "?"; return "?";
} }
public String toSystem(ParticipationStatus code) { public String toSystem(ParticipationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -162,7 +162,9 @@ public class AppointmentResponse extends DomainResource {
throw new FHIRException("Unknown ParticipantStatus code '"+codeString+"'"); throw new FHIRException("Unknown ParticipantStatus code '"+codeString+"'");
} }
public String toCode(ParticipantStatus code) { public String toCode(ParticipantStatus code) {
if (code == ParticipantStatus.ACCEPTED) if (code == ParticipantStatus.NULL)
return null;
if (code == ParticipantStatus.ACCEPTED)
return "accepted"; return "accepted";
if (code == ParticipantStatus.DECLINED) if (code == ParticipantStatus.DECLINED)
return "declined"; return "declined";
@ -171,7 +173,7 @@ public class AppointmentResponse extends DomainResource {
if (code == ParticipantStatus.NEEDSACTION) if (code == ParticipantStatus.NEEDSACTION)
return "needs-action"; return "needs-action";
return "?"; return "?";
} }
public String toSystem(ParticipantStatus code) { public String toSystem(ParticipantStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -178,7 +178,9 @@ public class AuditEvent extends DomainResource {
throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'");
} }
public String toCode(AuditEventAction code) { public String toCode(AuditEventAction code) {
if (code == AuditEventAction.C) if (code == AuditEventAction.NULL)
return null;
if (code == AuditEventAction.C)
return "C"; return "C";
if (code == AuditEventAction.R) if (code == AuditEventAction.R)
return "R"; return "R";
@ -189,7 +191,7 @@ public class AuditEvent extends DomainResource {
if (code == AuditEventAction.E) if (code == AuditEventAction.E)
return "E"; return "E";
return "?"; return "?";
} }
public String toSystem(AuditEventAction code) { public String toSystem(AuditEventAction code) {
return code.getSystem(); return code.getSystem();
} }
@ -308,7 +310,9 @@ public class AuditEvent extends DomainResource {
throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'");
} }
public String toCode(AuditEventOutcome code) { public String toCode(AuditEventOutcome code) {
if (code == AuditEventOutcome._0) if (code == AuditEventOutcome.NULL)
return null;
if (code == AuditEventOutcome._0)
return "0"; return "0";
if (code == AuditEventOutcome._4) if (code == AuditEventOutcome._4)
return "4"; return "4";
@ -317,7 +321,7 @@ public class AuditEvent extends DomainResource {
if (code == AuditEventOutcome._12) if (code == AuditEventOutcome._12)
return "12"; return "12";
return "?"; return "?";
} }
public String toSystem(AuditEventOutcome code) { public String toSystem(AuditEventOutcome code) {
return code.getSystem(); return code.getSystem();
} }
@ -450,7 +454,9 @@ public class AuditEvent extends DomainResource {
throw new FHIRException("Unknown AuditEventAgentNetworkType code '"+codeString+"'"); throw new FHIRException("Unknown AuditEventAgentNetworkType code '"+codeString+"'");
} }
public String toCode(AuditEventAgentNetworkType code) { public String toCode(AuditEventAgentNetworkType code) {
if (code == AuditEventAgentNetworkType._1) if (code == AuditEventAgentNetworkType.NULL)
return null;
if (code == AuditEventAgentNetworkType._1)
return "1"; return "1";
if (code == AuditEventAgentNetworkType._2) if (code == AuditEventAgentNetworkType._2)
return "2"; return "2";
@ -461,7 +467,7 @@ public class AuditEvent extends DomainResource {
if (code == AuditEventAgentNetworkType._5) if (code == AuditEventAgentNetworkType._5)
return "5"; return "5";
return "?"; return "?";
} }
public String toSystem(AuditEventAgentNetworkType code) { public String toSystem(AuditEventAgentNetworkType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -235,7 +235,9 @@ public class Bundle extends Resource implements IBaseBundle {
throw new FHIRException("Unknown BundleType code '"+codeString+"'"); throw new FHIRException("Unknown BundleType code '"+codeString+"'");
} }
public String toCode(BundleType code) { public String toCode(BundleType code) {
if (code == BundleType.DOCUMENT) if (code == BundleType.NULL)
return null;
if (code == BundleType.DOCUMENT)
return "document"; return "document";
if (code == BundleType.MESSAGE) if (code == BundleType.MESSAGE)
return "message"; return "message";
@ -254,7 +256,7 @@ public class Bundle extends Resource implements IBaseBundle {
if (code == BundleType.COLLECTION) if (code == BundleType.COLLECTION)
return "collection"; return "collection";
return "?"; return "?";
} }
public String toSystem(BundleType code) { public String toSystem(BundleType code) {
return code.getSystem(); return code.getSystem();
} }
@ -359,14 +361,16 @@ public class Bundle extends Resource implements IBaseBundle {
throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'"); throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'");
} }
public String toCode(SearchEntryMode code) { public String toCode(SearchEntryMode code) {
if (code == SearchEntryMode.MATCH) if (code == SearchEntryMode.NULL)
return null;
if (code == SearchEntryMode.MATCH)
return "match"; return "match";
if (code == SearchEntryMode.INCLUDE) if (code == SearchEntryMode.INCLUDE)
return "include"; return "include";
if (code == SearchEntryMode.OUTCOME) if (code == SearchEntryMode.OUTCOME)
return "outcome"; return "outcome";
return "?"; return "?";
} }
public String toSystem(SearchEntryMode code) { public String toSystem(SearchEntryMode code) {
return code.getSystem(); return code.getSystem();
} }
@ -485,7 +489,9 @@ public class Bundle extends Resource implements IBaseBundle {
throw new FHIRException("Unknown HTTPVerb code '"+codeString+"'"); throw new FHIRException("Unknown HTTPVerb code '"+codeString+"'");
} }
public String toCode(HTTPVerb code) { public String toCode(HTTPVerb code) {
if (code == HTTPVerb.GET) if (code == HTTPVerb.NULL)
return null;
if (code == HTTPVerb.GET)
return "GET"; return "GET";
if (code == HTTPVerb.POST) if (code == HTTPVerb.POST)
return "POST"; return "POST";
@ -494,7 +500,7 @@ public class Bundle extends Resource implements IBaseBundle {
if (code == HTTPVerb.DELETE) if (code == HTTPVerb.DELETE)
return "DELETE"; return "DELETE";
return "?"; return "?";
} }
public String toSystem(HTTPVerb code) { public String toSystem(HTTPVerb code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -158,14 +158,16 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'"); throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
} }
public String toCode(CapabilityStatementKind code) { public String toCode(CapabilityStatementKind code) {
if (code == CapabilityStatementKind.INSTANCE) if (code == CapabilityStatementKind.NULL)
return null;
if (code == CapabilityStatementKind.INSTANCE)
return "instance"; return "instance";
if (code == CapabilityStatementKind.CAPABILITY) if (code == CapabilityStatementKind.CAPABILITY)
return "capability"; return "capability";
if (code == CapabilityStatementKind.REQUIREMENTS) if (code == CapabilityStatementKind.REQUIREMENTS)
return "requirements"; return "requirements";
return "?"; return "?";
} }
public String toSystem(CapabilityStatementKind code) { public String toSystem(CapabilityStatementKind code) {
return code.getSystem(); return code.getSystem();
} }
@ -284,7 +286,9 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'"); throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'");
} }
public String toCode(UnknownContentCode code) { public String toCode(UnknownContentCode code) {
if (code == UnknownContentCode.NO) if (code == UnknownContentCode.NULL)
return null;
if (code == UnknownContentCode.NO)
return "no"; return "no";
if (code == UnknownContentCode.EXTENSIONS) if (code == UnknownContentCode.EXTENSIONS)
return "extensions"; return "extensions";
@ -293,7 +297,7 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
if (code == UnknownContentCode.BOTH) if (code == UnknownContentCode.BOTH)
return "both"; return "both";
return "?"; return "?";
} }
public String toSystem(UnknownContentCode code) { public String toSystem(UnknownContentCode code) {
return code.getSystem(); return code.getSystem();
} }
@ -384,12 +388,14 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'"); throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'");
} }
public String toCode(RestfulCapabilityMode code) { public String toCode(RestfulCapabilityMode code) {
if (code == RestfulCapabilityMode.CLIENT) if (code == RestfulCapabilityMode.NULL)
return null;
if (code == RestfulCapabilityMode.CLIENT)
return "client"; return "client";
if (code == RestfulCapabilityMode.SERVER) if (code == RestfulCapabilityMode.SERVER)
return "server"; return "server";
return "?"; return "?";
} }
public String toSystem(RestfulCapabilityMode code) { public String toSystem(RestfulCapabilityMode code) {
return code.getSystem(); return code.getSystem();
} }
@ -578,7 +584,9 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'"); throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'");
} }
public String toCode(TypeRestfulInteraction code) { public String toCode(TypeRestfulInteraction code) {
if (code == TypeRestfulInteraction.READ) if (code == TypeRestfulInteraction.NULL)
return null;
if (code == TypeRestfulInteraction.READ)
return "read"; return "read";
if (code == TypeRestfulInteraction.VREAD) if (code == TypeRestfulInteraction.VREAD)
return "vread"; return "vread";
@ -597,7 +605,7 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
if (code == TypeRestfulInteraction.SEARCHTYPE) if (code == TypeRestfulInteraction.SEARCHTYPE)
return "search-type"; return "search-type";
return "?"; return "?";
} }
public String toSystem(TypeRestfulInteraction code) { public String toSystem(TypeRestfulInteraction code) {
return code.getSystem(); return code.getSystem();
} }
@ -702,14 +710,16 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'"); throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'");
} }
public String toCode(ResourceVersionPolicy code) { public String toCode(ResourceVersionPolicy code) {
if (code == ResourceVersionPolicy.NOVERSION) if (code == ResourceVersionPolicy.NULL)
return null;
if (code == ResourceVersionPolicy.NOVERSION)
return "no-version"; return "no-version";
if (code == ResourceVersionPolicy.VERSIONED) if (code == ResourceVersionPolicy.VERSIONED)
return "versioned"; return "versioned";
if (code == ResourceVersionPolicy.VERSIONEDUPDATE) if (code == ResourceVersionPolicy.VERSIONEDUPDATE)
return "versioned-update"; return "versioned-update";
return "?"; return "?";
} }
public String toSystem(ResourceVersionPolicy code) { public String toSystem(ResourceVersionPolicy code) {
return code.getSystem(); return code.getSystem();
} }
@ -828,7 +838,9 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown ConditionalReadStatus code '"+codeString+"'"); throw new FHIRException("Unknown ConditionalReadStatus code '"+codeString+"'");
} }
public String toCode(ConditionalReadStatus code) { public String toCode(ConditionalReadStatus code) {
if (code == ConditionalReadStatus.NOTSUPPORTED) if (code == ConditionalReadStatus.NULL)
return null;
if (code == ConditionalReadStatus.NOTSUPPORTED)
return "not-supported"; return "not-supported";
if (code == ConditionalReadStatus.MODIFIEDSINCE) if (code == ConditionalReadStatus.MODIFIEDSINCE)
return "modified-since"; return "modified-since";
@ -837,7 +849,7 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
if (code == ConditionalReadStatus.FULLSUPPORT) if (code == ConditionalReadStatus.FULLSUPPORT)
return "full-support"; return "full-support";
return "?"; return "?";
} }
public String toSystem(ConditionalReadStatus code) { public String toSystem(ConditionalReadStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -942,14 +954,16 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'");
} }
public String toCode(ConditionalDeleteStatus code) { public String toCode(ConditionalDeleteStatus code) {
if (code == ConditionalDeleteStatus.NOTSUPPORTED) if (code == ConditionalDeleteStatus.NULL)
return null;
if (code == ConditionalDeleteStatus.NOTSUPPORTED)
return "not-supported"; return "not-supported";
if (code == ConditionalDeleteStatus.SINGLE) if (code == ConditionalDeleteStatus.SINGLE)
return "single"; return "single";
if (code == ConditionalDeleteStatus.MULTIPLE) if (code == ConditionalDeleteStatus.MULTIPLE)
return "multiple"; return "multiple";
return "?"; return "?";
} }
public String toSystem(ConditionalDeleteStatus code) { public String toSystem(ConditionalDeleteStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -1082,7 +1096,9 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown ReferenceHandlingPolicy code '"+codeString+"'"); throw new FHIRException("Unknown ReferenceHandlingPolicy code '"+codeString+"'");
} }
public String toCode(ReferenceHandlingPolicy code) { public String toCode(ReferenceHandlingPolicy code) {
if (code == ReferenceHandlingPolicy.LITERAL) if (code == ReferenceHandlingPolicy.NULL)
return null;
if (code == ReferenceHandlingPolicy.LITERAL)
return "literal"; return "literal";
if (code == ReferenceHandlingPolicy.LOGICAL) if (code == ReferenceHandlingPolicy.LOGICAL)
return "logical"; return "logical";
@ -1093,7 +1109,7 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
if (code == ReferenceHandlingPolicy.LOCAL) if (code == ReferenceHandlingPolicy.LOCAL)
return "local"; return "local";
return "?"; return "?";
} }
public String toSystem(ReferenceHandlingPolicy code) { public String toSystem(ReferenceHandlingPolicy code) {
return code.getSystem(); return code.getSystem();
} }
@ -1212,7 +1228,9 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'"); throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'");
} }
public String toCode(SystemRestfulInteraction code) { public String toCode(SystemRestfulInteraction code) {
if (code == SystemRestfulInteraction.TRANSACTION) if (code == SystemRestfulInteraction.NULL)
return null;
if (code == SystemRestfulInteraction.TRANSACTION)
return "transaction"; return "transaction";
if (code == SystemRestfulInteraction.BATCH) if (code == SystemRestfulInteraction.BATCH)
return "batch"; return "batch";
@ -1221,7 +1239,7 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
if (code == SystemRestfulInteraction.HISTORYSYSTEM) if (code == SystemRestfulInteraction.HISTORYSYSTEM)
return "history-system"; return "history-system";
return "?"; return "?";
} }
public String toSystem(SystemRestfulInteraction code) { public String toSystem(SystemRestfulInteraction code) {
return code.getSystem(); return code.getSystem();
} }
@ -1312,12 +1330,14 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown EventCapabilityMode code '"+codeString+"'"); throw new FHIRException("Unknown EventCapabilityMode code '"+codeString+"'");
} }
public String toCode(EventCapabilityMode code) { public String toCode(EventCapabilityMode code) {
if (code == EventCapabilityMode.SENDER) if (code == EventCapabilityMode.NULL)
return null;
if (code == EventCapabilityMode.SENDER)
return "sender"; return "sender";
if (code == EventCapabilityMode.RECEIVER) if (code == EventCapabilityMode.RECEIVER)
return "receiver"; return "receiver";
return "?"; return "?";
} }
public String toSystem(EventCapabilityMode code) { public String toSystem(EventCapabilityMode code) {
return code.getSystem(); return code.getSystem();
} }
@ -1422,14 +1442,16 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'");
} }
public String toCode(MessageSignificanceCategory code) { public String toCode(MessageSignificanceCategory code) {
if (code == MessageSignificanceCategory.CONSEQUENCE) if (code == MessageSignificanceCategory.NULL)
return null;
if (code == MessageSignificanceCategory.CONSEQUENCE)
return "Consequence"; return "Consequence";
if (code == MessageSignificanceCategory.CURRENCY) if (code == MessageSignificanceCategory.CURRENCY)
return "Currency"; return "Currency";
if (code == MessageSignificanceCategory.NOTIFICATION) if (code == MessageSignificanceCategory.NOTIFICATION)
return "Notification"; return "Notification";
return "?"; return "?";
} }
public String toSystem(MessageSignificanceCategory code) { public String toSystem(MessageSignificanceCategory code) {
return code.getSystem(); return code.getSystem();
} }
@ -1520,12 +1542,14 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
throw new FHIRException("Unknown DocumentMode code '"+codeString+"'"); throw new FHIRException("Unknown DocumentMode code '"+codeString+"'");
} }
public String toCode(DocumentMode code) { public String toCode(DocumentMode code) {
if (code == DocumentMode.PRODUCER) if (code == DocumentMode.NULL)
return null;
if (code == DocumentMode.PRODUCER)
return "producer"; return "producer";
if (code == DocumentMode.CONSUMER) if (code == DocumentMode.CONSUMER)
return "consumer"; return "consumer";
return "?"; return "?";
} }
public String toSystem(DocumentMode code) { public String toSystem(DocumentMode code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -206,7 +206,9 @@ public class CarePlan extends DomainResource {
throw new FHIRException("Unknown CarePlanStatus code '"+codeString+"'"); throw new FHIRException("Unknown CarePlanStatus code '"+codeString+"'");
} }
public String toCode(CarePlanStatus code) { public String toCode(CarePlanStatus code) {
if (code == CarePlanStatus.DRAFT) if (code == CarePlanStatus.NULL)
return null;
if (code == CarePlanStatus.DRAFT)
return "draft"; return "draft";
if (code == CarePlanStatus.ACTIVE) if (code == CarePlanStatus.ACTIVE)
return "active"; return "active";
@ -221,7 +223,7 @@ public class CarePlan extends DomainResource {
if (code == CarePlanStatus.UNKNOWN) if (code == CarePlanStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(CarePlanStatus code) { public String toSystem(CarePlanStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -342,7 +344,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'"); throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'");
} }
public String toCode(CarePlanIntent code) { public String toCode(CarePlanIntent code) {
if (code == CarePlanIntent.PROPOSAL) if (code == CarePlanIntent.NULL)
return null;
if (code == CarePlanIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == CarePlanIntent.PLAN) if (code == CarePlanIntent.PLAN)
return "plan"; return "plan";
@ -351,7 +355,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == CarePlanIntent.OPTION) if (code == CarePlanIntent.OPTION)
return "option"; return "option";
return "?"; return "?";
} }
public String toSystem(CarePlanIntent code) { public String toSystem(CarePlanIntent code) {
return code.getSystem(); return code.getSystem();
} }
@ -512,7 +516,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown CarePlanActivityStatus code '"+codeString+"'"); throw new FHIRException("Unknown CarePlanActivityStatus code '"+codeString+"'");
} }
public String toCode(CarePlanActivityStatus code) { public String toCode(CarePlanActivityStatus code) {
if (code == CarePlanActivityStatus.NOTSTARTED) if (code == CarePlanActivityStatus.NULL)
return null;
if (code == CarePlanActivityStatus.NOTSTARTED)
return "not-started"; return "not-started";
if (code == CarePlanActivityStatus.SCHEDULED) if (code == CarePlanActivityStatus.SCHEDULED)
return "scheduled"; return "scheduled";
@ -527,7 +533,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == CarePlanActivityStatus.UNKNOWN) if (code == CarePlanActivityStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(CarePlanActivityStatus code) { public String toSystem(CarePlanActivityStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -177,7 +177,9 @@ public class CareTeam extends DomainResource {
throw new FHIRException("Unknown CareTeamStatus code '"+codeString+"'"); throw new FHIRException("Unknown CareTeamStatus code '"+codeString+"'");
} }
public String toCode(CareTeamStatus code) { public String toCode(CareTeamStatus code) {
if (code == CareTeamStatus.PROPOSED) if (code == CareTeamStatus.NULL)
return null;
if (code == CareTeamStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == CareTeamStatus.ACTIVE) if (code == CareTeamStatus.ACTIVE)
return "active"; return "active";
@ -188,7 +190,7 @@ public class CareTeam extends DomainResource {
if (code == CareTeamStatus.ENTEREDINERROR) if (code == CareTeamStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(CareTeamStatus code) { public String toSystem(CareTeamStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -210,7 +210,9 @@ public class ChargeItem extends DomainResource {
throw new FHIRException("Unknown ChargeItemStatus code '"+codeString+"'"); throw new FHIRException("Unknown ChargeItemStatus code '"+codeString+"'");
} }
public String toCode(ChargeItemStatus code) { public String toCode(ChargeItemStatus code) {
if (code == ChargeItemStatus.PLANNED) if (code == ChargeItemStatus.NULL)
return null;
if (code == ChargeItemStatus.PLANNED)
return "planned"; return "planned";
if (code == ChargeItemStatus.BILLABLE) if (code == ChargeItemStatus.BILLABLE)
return "billable"; return "billable";
@ -225,7 +227,7 @@ public class ChargeItem extends DomainResource {
if (code == ChargeItemStatus.UNKNOWN) if (code == ChargeItemStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(ChargeItemStatus code) { public String toSystem(ChargeItemStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -165,7 +165,9 @@ public class Claim extends DomainResource {
throw new FHIRException("Unknown ClaimStatus code '"+codeString+"'"); throw new FHIRException("Unknown ClaimStatus code '"+codeString+"'");
} }
public String toCode(ClaimStatus code) { public String toCode(ClaimStatus code) {
if (code == ClaimStatus.ACTIVE) if (code == ClaimStatus.NULL)
return null;
if (code == ClaimStatus.ACTIVE)
return "active"; return "active";
if (code == ClaimStatus.CANCELLED) if (code == ClaimStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -174,7 +176,7 @@ public class Claim extends DomainResource {
if (code == ClaimStatus.ENTEREDINERROR) if (code == ClaimStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ClaimStatus code) { public String toSystem(ClaimStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -293,7 +295,9 @@ public class Claim extends DomainResource {
throw new FHIRException("Unknown Use code '"+codeString+"'"); throw new FHIRException("Unknown Use code '"+codeString+"'");
} }
public String toCode(Use code) { public String toCode(Use code) {
if (code == Use.COMPLETE) if (code == Use.NULL)
return null;
if (code == Use.COMPLETE)
return "complete"; return "complete";
if (code == Use.PROPOSED) if (code == Use.PROPOSED)
return "proposed"; return "proposed";
@ -302,7 +306,7 @@ public class Claim extends DomainResource {
if (code == Use.OTHER) if (code == Use.OTHER)
return "other"; return "other";
return "?"; return "?";
} }
public String toSystem(Use code) { public String toSystem(Use code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -164,7 +164,9 @@ public class ClaimResponse extends DomainResource {
throw new FHIRException("Unknown ClaimResponseStatus code '"+codeString+"'"); throw new FHIRException("Unknown ClaimResponseStatus code '"+codeString+"'");
} }
public String toCode(ClaimResponseStatus code) { public String toCode(ClaimResponseStatus code) {
if (code == ClaimResponseStatus.ACTIVE) if (code == ClaimResponseStatus.NULL)
return null;
if (code == ClaimResponseStatus.ACTIVE)
return "active"; return "active";
if (code == ClaimResponseStatus.CANCELLED) if (code == ClaimResponseStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -173,7 +175,7 @@ public class ClaimResponse extends DomainResource {
if (code == ClaimResponseStatus.ENTEREDINERROR) if (code == ClaimResponseStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ClaimResponseStatus code) { public String toSystem(ClaimResponseStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -152,14 +152,16 @@ public class ClinicalImpression extends DomainResource {
throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'"); throw new FHIRException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
} }
public String toCode(ClinicalImpressionStatus code) { public String toCode(ClinicalImpressionStatus code) {
if (code == ClinicalImpressionStatus.DRAFT) if (code == ClinicalImpressionStatus.NULL)
return null;
if (code == ClinicalImpressionStatus.DRAFT)
return "draft"; return "draft";
if (code == ClinicalImpressionStatus.COMPLETED) if (code == ClinicalImpressionStatus.COMPLETED)
return "completed"; return "completed";
if (code == ClinicalImpressionStatus.ENTEREDINERROR) if (code == ClinicalImpressionStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ClinicalImpressionStatus code) { public String toSystem(ClinicalImpressionStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -169,7 +169,9 @@ public class CodeSystem extends MetadataResource {
throw new FHIRException("Unknown CodeSystemHierarchyMeaning code '"+codeString+"'"); throw new FHIRException("Unknown CodeSystemHierarchyMeaning code '"+codeString+"'");
} }
public String toCode(CodeSystemHierarchyMeaning code) { public String toCode(CodeSystemHierarchyMeaning code) {
if (code == CodeSystemHierarchyMeaning.GROUPEDBY) if (code == CodeSystemHierarchyMeaning.NULL)
return null;
if (code == CodeSystemHierarchyMeaning.GROUPEDBY)
return "grouped-by"; return "grouped-by";
if (code == CodeSystemHierarchyMeaning.ISA) if (code == CodeSystemHierarchyMeaning.ISA)
return "is-a"; return "is-a";
@ -178,7 +180,7 @@ public class CodeSystem extends MetadataResource {
if (code == CodeSystemHierarchyMeaning.CLASSIFIEDWITH) if (code == CodeSystemHierarchyMeaning.CLASSIFIEDWITH)
return "classified-with"; return "classified-with";
return "?"; return "?";
} }
public String toSystem(CodeSystemHierarchyMeaning code) { public String toSystem(CodeSystemHierarchyMeaning code) {
return code.getSystem(); return code.getSystem();
} }
@ -297,7 +299,9 @@ public class CodeSystem extends MetadataResource {
throw new FHIRException("Unknown CodeSystemContentMode code '"+codeString+"'"); throw new FHIRException("Unknown CodeSystemContentMode code '"+codeString+"'");
} }
public String toCode(CodeSystemContentMode code) { public String toCode(CodeSystemContentMode code) {
if (code == CodeSystemContentMode.NOTPRESENT) if (code == CodeSystemContentMode.NULL)
return null;
if (code == CodeSystemContentMode.NOTPRESENT)
return "not-present"; return "not-present";
if (code == CodeSystemContentMode.EXAMPLE) if (code == CodeSystemContentMode.EXAMPLE)
return "example"; return "example";
@ -306,7 +310,7 @@ public class CodeSystem extends MetadataResource {
if (code == CodeSystemContentMode.COMPLETE) if (code == CodeSystemContentMode.COMPLETE)
return "complete"; return "complete";
return "?"; return "?";
} }
public String toSystem(CodeSystemContentMode code) { public String toSystem(CodeSystemContentMode code) {
return code.getSystem(); return code.getSystem();
} }
@ -495,7 +499,9 @@ public class CodeSystem extends MetadataResource {
throw new FHIRException("Unknown FilterOperator code '"+codeString+"'"); throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
} }
public String toCode(FilterOperator code) { public String toCode(FilterOperator code) {
if (code == FilterOperator.EQUAL) if (code == FilterOperator.NULL)
return null;
if (code == FilterOperator.EQUAL)
return "="; return "=";
if (code == FilterOperator.ISA) if (code == FilterOperator.ISA)
return "is-a"; return "is-a";
@ -514,7 +520,7 @@ public class CodeSystem extends MetadataResource {
if (code == FilterOperator.EXISTS) if (code == FilterOperator.EXISTS)
return "exists"; return "exists";
return "?"; return "?";
} }
public String toSystem(FilterOperator code) { public String toSystem(FilterOperator code) {
return code.getSystem(); return code.getSystem();
} }
@ -661,7 +667,9 @@ public class CodeSystem extends MetadataResource {
throw new FHIRException("Unknown PropertyType code '"+codeString+"'"); throw new FHIRException("Unknown PropertyType code '"+codeString+"'");
} }
public String toCode(PropertyType code) { public String toCode(PropertyType code) {
if (code == PropertyType.CODE) if (code == PropertyType.NULL)
return null;
if (code == PropertyType.CODE)
return "code"; return "code";
if (code == PropertyType.CODING) if (code == PropertyType.CODING)
return "Coding"; return "Coding";
@ -674,7 +682,7 @@ public class CodeSystem extends MetadataResource {
if (code == PropertyType.DATETIME) if (code == PropertyType.DATETIME)
return "dateTime"; return "dateTime";
return "?"; return "?";
} }
public String toSystem(PropertyType code) { public String toSystem(PropertyType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -206,7 +206,9 @@ public class Communication extends DomainResource {
throw new FHIRException("Unknown CommunicationStatus code '"+codeString+"'"); throw new FHIRException("Unknown CommunicationStatus code '"+codeString+"'");
} }
public String toCode(CommunicationStatus code) { public String toCode(CommunicationStatus code) {
if (code == CommunicationStatus.PREPARATION) if (code == CommunicationStatus.NULL)
return null;
if (code == CommunicationStatus.PREPARATION)
return "preparation"; return "preparation";
if (code == CommunicationStatus.INPROGRESS) if (code == CommunicationStatus.INPROGRESS)
return "in-progress"; return "in-progress";
@ -221,7 +223,7 @@ public class Communication extends DomainResource {
if (code == CommunicationStatus.UNKNOWN) if (code == CommunicationStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(CommunicationStatus code) { public String toSystem(CommunicationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -206,7 +206,9 @@ public class CommunicationRequest extends DomainResource {
throw new FHIRException("Unknown CommunicationRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown CommunicationRequestStatus code '"+codeString+"'");
} }
public String toCode(CommunicationRequestStatus code) { public String toCode(CommunicationRequestStatus code) {
if (code == CommunicationRequestStatus.DRAFT) if (code == CommunicationRequestStatus.NULL)
return null;
if (code == CommunicationRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == CommunicationRequestStatus.ACTIVE) if (code == CommunicationRequestStatus.ACTIVE)
return "active"; return "active";
@ -221,7 +223,7 @@ public class CommunicationRequest extends DomainResource {
if (code == CommunicationRequestStatus.UNKNOWN) if (code == CommunicationRequestStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(CommunicationRequestStatus code) { public String toSystem(CommunicationRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -340,7 +342,9 @@ public class CommunicationRequest extends DomainResource {
throw new FHIRException("Unknown CommunicationPriority code '"+codeString+"'"); throw new FHIRException("Unknown CommunicationPriority code '"+codeString+"'");
} }
public String toCode(CommunicationPriority code) { public String toCode(CommunicationPriority code) {
if (code == CommunicationPriority.ROUTINE) if (code == CommunicationPriority.NULL)
return null;
if (code == CommunicationPriority.ROUTINE)
return "routine"; return "routine";
if (code == CommunicationPriority.URGENT) if (code == CommunicationPriority.URGENT)
return "urgent"; return "urgent";
@ -349,7 +353,7 @@ public class CommunicationRequest extends DomainResource {
if (code == CommunicationPriority.STAT) if (code == CommunicationPriority.STAT)
return "stat"; return "stat";
return "?"; return "?";
} }
public String toSystem(CommunicationPriority code) { public String toSystem(CommunicationPriority code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -182,7 +182,9 @@ public class CompartmentDefinition extends MetadataResource {
throw new FHIRException("Unknown CompartmentType code '"+codeString+"'"); throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
} }
public String toCode(CompartmentType code) { public String toCode(CompartmentType code) {
if (code == CompartmentType.PATIENT) if (code == CompartmentType.NULL)
return null;
if (code == CompartmentType.PATIENT)
return "Patient"; return "Patient";
if (code == CompartmentType.ENCOUNTER) if (code == CompartmentType.ENCOUNTER)
return "Encounter"; return "Encounter";
@ -193,7 +195,7 @@ public class CompartmentDefinition extends MetadataResource {
if (code == CompartmentType.DEVICE) if (code == CompartmentType.DEVICE)
return "Device"; return "Device";
return "?"; return "?";
} }
public String toSystem(CompartmentType code) { public String toSystem(CompartmentType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -165,7 +165,9 @@ public class Composition extends DomainResource {
throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'"); throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'");
} }
public String toCode(CompositionStatus code) { public String toCode(CompositionStatus code) {
if (code == CompositionStatus.PRELIMINARY) if (code == CompositionStatus.NULL)
return null;
if (code == CompositionStatus.PRELIMINARY)
return "preliminary"; return "preliminary";
if (code == CompositionStatus.FINAL) if (code == CompositionStatus.FINAL)
return "final"; return "final";
@ -174,7 +176,7 @@ public class Composition extends DomainResource {
if (code == CompositionStatus.ENTEREDINERROR) if (code == CompositionStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(CompositionStatus code) { public String toSystem(CompositionStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -321,7 +323,9 @@ public class Composition extends DomainResource {
throw new FHIRException("Unknown DocumentConfidentiality code '"+codeString+"'"); throw new FHIRException("Unknown DocumentConfidentiality code '"+codeString+"'");
} }
public String toCode(DocumentConfidentiality code) { public String toCode(DocumentConfidentiality code) {
if (code == DocumentConfidentiality.U) if (code == DocumentConfidentiality.NULL)
return null;
if (code == DocumentConfidentiality.U)
return "U"; return "U";
if (code == DocumentConfidentiality.L) if (code == DocumentConfidentiality.L)
return "L"; return "L";
@ -334,7 +338,7 @@ public class Composition extends DomainResource {
if (code == DocumentConfidentiality.V) if (code == DocumentConfidentiality.V)
return "V"; return "V";
return "?"; return "?";
} }
public String toSystem(DocumentConfidentiality code) { public String toSystem(DocumentConfidentiality code) {
return code.getSystem(); return code.getSystem();
} }
@ -453,7 +457,9 @@ public class Composition extends DomainResource {
throw new FHIRException("Unknown CompositionAttestationMode code '"+codeString+"'"); throw new FHIRException("Unknown CompositionAttestationMode code '"+codeString+"'");
} }
public String toCode(CompositionAttestationMode code) { public String toCode(CompositionAttestationMode code) {
if (code == CompositionAttestationMode.PERSONAL) if (code == CompositionAttestationMode.NULL)
return null;
if (code == CompositionAttestationMode.PERSONAL)
return "personal"; return "personal";
if (code == CompositionAttestationMode.PROFESSIONAL) if (code == CompositionAttestationMode.PROFESSIONAL)
return "professional"; return "professional";
@ -462,7 +468,7 @@ public class Composition extends DomainResource {
if (code == CompositionAttestationMode.OFFICIAL) if (code == CompositionAttestationMode.OFFICIAL)
return "official"; return "official";
return "?"; return "?";
} }
public String toSystem(CompositionAttestationMode code) { public String toSystem(CompositionAttestationMode code) {
return code.getSystem(); return code.getSystem();
} }
@ -581,7 +587,9 @@ public class Composition extends DomainResource {
throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'"); throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'");
} }
public String toCode(DocumentRelationshipType code) { public String toCode(DocumentRelationshipType code) {
if (code == DocumentRelationshipType.REPLACES) if (code == DocumentRelationshipType.NULL)
return null;
if (code == DocumentRelationshipType.REPLACES)
return "replaces"; return "replaces";
if (code == DocumentRelationshipType.TRANSFORMS) if (code == DocumentRelationshipType.TRANSFORMS)
return "transforms"; return "transforms";
@ -590,7 +598,7 @@ public class Composition extends DomainResource {
if (code == DocumentRelationshipType.APPENDS) if (code == DocumentRelationshipType.APPENDS)
return "appends"; return "appends";
return "?"; return "?";
} }
public String toSystem(DocumentRelationshipType code) { public String toSystem(DocumentRelationshipType code) {
return code.getSystem(); return code.getSystem();
} }
@ -695,14 +703,16 @@ public class Composition extends DomainResource {
throw new FHIRException("Unknown SectionMode code '"+codeString+"'"); throw new FHIRException("Unknown SectionMode code '"+codeString+"'");
} }
public String toCode(SectionMode code) { public String toCode(SectionMode code) {
if (code == SectionMode.WORKING) if (code == SectionMode.NULL)
return null;
if (code == SectionMode.WORKING)
return "working"; return "working";
if (code == SectionMode.SNAPSHOT) if (code == SectionMode.SNAPSHOT)
return "snapshot"; return "snapshot";
if (code == SectionMode.CHANGES) if (code == SectionMode.CHANGES)
return "changes"; return "changes";
return "?"; return "?";
} }
public String toSystem(SectionMode code) { public String toSystem(SectionMode code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -158,14 +158,16 @@ public class ConceptMap extends MetadataResource {
throw new FHIRException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'"); throw new FHIRException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
} }
public String toCode(ConceptMapGroupUnmappedMode code) { public String toCode(ConceptMapGroupUnmappedMode code) {
if (code == ConceptMapGroupUnmappedMode.PROVIDED) if (code == ConceptMapGroupUnmappedMode.NULL)
return null;
if (code == ConceptMapGroupUnmappedMode.PROVIDED)
return "provided"; return "provided";
if (code == ConceptMapGroupUnmappedMode.FIXED) if (code == ConceptMapGroupUnmappedMode.FIXED)
return "fixed"; return "fixed";
if (code == ConceptMapGroupUnmappedMode.OTHERMAP) if (code == ConceptMapGroupUnmappedMode.OTHERMAP)
return "other-map"; return "other-map";
return "?"; return "?";
} }
public String toSystem(ConceptMapGroupUnmappedMode code) { public String toSystem(ConceptMapGroupUnmappedMode code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -178,7 +178,9 @@ public class Condition extends DomainResource {
throw new FHIRException("Unknown ConditionClinicalStatus code '"+codeString+"'"); throw new FHIRException("Unknown ConditionClinicalStatus code '"+codeString+"'");
} }
public String toCode(ConditionClinicalStatus code) { public String toCode(ConditionClinicalStatus code) {
if (code == ConditionClinicalStatus.ACTIVE) if (code == ConditionClinicalStatus.NULL)
return null;
if (code == ConditionClinicalStatus.ACTIVE)
return "active"; return "active";
if (code == ConditionClinicalStatus.RECURRENCE) if (code == ConditionClinicalStatus.RECURRENCE)
return "recurrence"; return "recurrence";
@ -189,7 +191,7 @@ public class Condition extends DomainResource {
if (code == ConditionClinicalStatus.RESOLVED) if (code == ConditionClinicalStatus.RESOLVED)
return "resolved"; return "resolved";
return "?"; return "?";
} }
public String toSystem(ConditionClinicalStatus code) { public String toSystem(ConditionClinicalStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -336,7 +338,9 @@ public class Condition extends DomainResource {
throw new FHIRException("Unknown ConditionVerificationStatus code '"+codeString+"'"); throw new FHIRException("Unknown ConditionVerificationStatus code '"+codeString+"'");
} }
public String toCode(ConditionVerificationStatus code) { public String toCode(ConditionVerificationStatus code) {
if (code == ConditionVerificationStatus.PROVISIONAL) if (code == ConditionVerificationStatus.NULL)
return null;
if (code == ConditionVerificationStatus.PROVISIONAL)
return "provisional"; return "provisional";
if (code == ConditionVerificationStatus.DIFFERENTIAL) if (code == ConditionVerificationStatus.DIFFERENTIAL)
return "differential"; return "differential";
@ -349,7 +353,7 @@ public class Condition extends DomainResource {
if (code == ConditionVerificationStatus.UNKNOWN) if (code == ConditionVerificationStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(ConditionVerificationStatus code) { public String toSystem(ConditionVerificationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -193,7 +193,9 @@ public class Consent extends DomainResource {
throw new FHIRException("Unknown ConsentState code '"+codeString+"'"); throw new FHIRException("Unknown ConsentState code '"+codeString+"'");
} }
public String toCode(ConsentState code) { public String toCode(ConsentState code) {
if (code == ConsentState.DRAFT) if (code == ConsentState.NULL)
return null;
if (code == ConsentState.DRAFT)
return "draft"; return "draft";
if (code == ConsentState.PROPOSED) if (code == ConsentState.PROPOSED)
return "proposed"; return "proposed";
@ -206,7 +208,7 @@ public class Consent extends DomainResource {
if (code == ConsentState.ENTEREDINERROR) if (code == ConsentState.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ConsentState code) { public String toSystem(ConsentState code) {
return code.getSystem(); return code.getSystem();
} }
@ -325,7 +327,9 @@ public class Consent extends DomainResource {
throw new FHIRException("Unknown ConsentDataMeaning code '"+codeString+"'"); throw new FHIRException("Unknown ConsentDataMeaning code '"+codeString+"'");
} }
public String toCode(ConsentDataMeaning code) { public String toCode(ConsentDataMeaning code) {
if (code == ConsentDataMeaning.INSTANCE) if (code == ConsentDataMeaning.NULL)
return null;
if (code == ConsentDataMeaning.INSTANCE)
return "instance"; return "instance";
if (code == ConsentDataMeaning.RELATED) if (code == ConsentDataMeaning.RELATED)
return "related"; return "related";
@ -334,7 +338,7 @@ public class Consent extends DomainResource {
if (code == ConsentDataMeaning.AUTHOREDBY) if (code == ConsentDataMeaning.AUTHOREDBY)
return "authoredby"; return "authoredby";
return "?"; return "?";
} }
public String toSystem(ConsentDataMeaning code) { public String toSystem(ConsentDataMeaning code) {
return code.getSystem(); return code.getSystem();
} }
@ -425,12 +429,14 @@ public class Consent extends DomainResource {
throw new FHIRException("Unknown ConsentExceptType code '"+codeString+"'"); throw new FHIRException("Unknown ConsentExceptType code '"+codeString+"'");
} }
public String toCode(ConsentExceptType code) { public String toCode(ConsentExceptType code) {
if (code == ConsentExceptType.DENY) if (code == ConsentExceptType.NULL)
return null;
if (code == ConsentExceptType.DENY)
return "deny"; return "deny";
if (code == ConsentExceptType.PERMIT) if (code == ConsentExceptType.PERMIT)
return "permit"; return "permit";
return "?"; return "?";
} }
public String toSystem(ConsentExceptType code) { public String toSystem(ConsentExceptType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -202,7 +202,9 @@ public class ContactPoint extends Type implements ICompositeType {
throw new FHIRException("Unknown ContactPointSystem code '"+codeString+"'"); throw new FHIRException("Unknown ContactPointSystem code '"+codeString+"'");
} }
public String toCode(ContactPointSystem code) { public String toCode(ContactPointSystem code) {
if (code == ContactPointSystem.PHONE) if (code == ContactPointSystem.NULL)
return null;
if (code == ContactPointSystem.PHONE)
return "phone"; return "phone";
if (code == ContactPointSystem.FAX) if (code == ContactPointSystem.FAX)
return "fax"; return "fax";
@ -217,7 +219,7 @@ public class ContactPoint extends Type implements ICompositeType {
if (code == ContactPointSystem.OTHER) if (code == ContactPointSystem.OTHER)
return "other"; return "other";
return "?"; return "?";
} }
public String toSystem(ContactPointSystem code) { public String toSystem(ContactPointSystem code) {
return code.getSystem(); return code.getSystem();
} }
@ -350,7 +352,9 @@ public class ContactPoint extends Type implements ICompositeType {
throw new FHIRException("Unknown ContactPointUse code '"+codeString+"'"); throw new FHIRException("Unknown ContactPointUse code '"+codeString+"'");
} }
public String toCode(ContactPointUse code) { public String toCode(ContactPointUse code) {
if (code == ContactPointUse.HOME) if (code == ContactPointUse.NULL)
return null;
if (code == ContactPointUse.HOME)
return "home"; return "home";
if (code == ContactPointUse.WORK) if (code == ContactPointUse.WORK)
return "work"; return "work";
@ -361,7 +365,7 @@ public class ContactPoint extends Type implements ICompositeType {
if (code == ContactPointUse.MOBILE) if (code == ContactPointUse.MOBILE)
return "mobile"; return "mobile";
return "?"; return "?";
} }
public String toSystem(ContactPointUse code) { public String toSystem(ContactPointUse code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -322,7 +322,9 @@ public class Contract extends DomainResource {
throw new FHIRException("Unknown ContractStatus code '"+codeString+"'"); throw new FHIRException("Unknown ContractStatus code '"+codeString+"'");
} }
public String toCode(ContractStatus code) { public String toCode(ContractStatus code) {
if (code == ContractStatus.AMENDED) if (code == ContractStatus.NULL)
return null;
if (code == ContractStatus.AMENDED)
return "amended"; return "amended";
if (code == ContractStatus.APPENDED) if (code == ContractStatus.APPENDED)
return "appended"; return "appended";
@ -353,7 +355,7 @@ public class Contract extends DomainResource {
if (code == ContractStatus.TERMINATED) if (code == ContractStatus.TERMINATED)
return "terminated"; return "terminated";
return "?"; return "?";
} }
public String toSystem(ContractStatus code) { public String toSystem(ContractStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -161,7 +161,9 @@ public class Contributor extends Type implements ICompositeType {
throw new FHIRException("Unknown ContributorType code '"+codeString+"'"); throw new FHIRException("Unknown ContributorType code '"+codeString+"'");
} }
public String toCode(ContributorType code) { public String toCode(ContributorType code) {
if (code == ContributorType.AUTHOR) if (code == ContributorType.NULL)
return null;
if (code == ContributorType.AUTHOR)
return "author"; return "author";
if (code == ContributorType.EDITOR) if (code == ContributorType.EDITOR)
return "editor"; return "editor";
@ -170,7 +172,7 @@ public class Contributor extends Type implements ICompositeType {
if (code == ContributorType.ENDORSER) if (code == ContributorType.ENDORSER)
return "endorser"; return "endorser";
return "?"; return "?";
} }
public String toSystem(ContributorType code) { public String toSystem(ContributorType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -163,7 +163,9 @@ public class Coverage extends DomainResource {
throw new FHIRException("Unknown CoverageStatus code '"+codeString+"'"); throw new FHIRException("Unknown CoverageStatus code '"+codeString+"'");
} }
public String toCode(CoverageStatus code) { public String toCode(CoverageStatus code) {
if (code == CoverageStatus.ACTIVE) if (code == CoverageStatus.NULL)
return null;
if (code == CoverageStatus.ACTIVE)
return "active"; return "active";
if (code == CoverageStatus.CANCELLED) if (code == CoverageStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -172,7 +174,7 @@ public class Coverage extends DomainResource {
if (code == CoverageStatus.ENTEREDINERROR) if (code == CoverageStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(CoverageStatus code) { public String toSystem(CoverageStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -196,7 +196,9 @@ public class DataElement extends MetadataResource {
throw new FHIRException("Unknown DataElementStringency code '"+codeString+"'"); throw new FHIRException("Unknown DataElementStringency code '"+codeString+"'");
} }
public String toCode(DataElementStringency code) { public String toCode(DataElementStringency code) {
if (code == DataElementStringency.COMPARABLE) if (code == DataElementStringency.NULL)
return null;
if (code == DataElementStringency.COMPARABLE)
return "comparable"; return "comparable";
if (code == DataElementStringency.FULLYSPECIFIED) if (code == DataElementStringency.FULLYSPECIFIED)
return "fully-specified"; return "fully-specified";
@ -209,7 +211,7 @@ public class DataElement extends MetadataResource {
if (code == DataElementStringency.FLEXIBLE) if (code == DataElementStringency.FLEXIBLE)
return "flexible"; return "flexible";
return "?"; return "?";
} }
public String toSystem(DataElementStringency code) { public String toSystem(DataElementStringency code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -220,7 +220,9 @@ public class DetectedIssue extends DomainResource {
throw new FHIRException("Unknown DetectedIssueStatus code '"+codeString+"'"); throw new FHIRException("Unknown DetectedIssueStatus code '"+codeString+"'");
} }
public String toCode(DetectedIssueStatus code) { public String toCode(DetectedIssueStatus code) {
if (code == DetectedIssueStatus.REGISTERED) if (code == DetectedIssueStatus.NULL)
return null;
if (code == DetectedIssueStatus.REGISTERED)
return "registered"; return "registered";
if (code == DetectedIssueStatus.PRELIMINARY) if (code == DetectedIssueStatus.PRELIMINARY)
return "preliminary"; return "preliminary";
@ -237,7 +239,7 @@ public class DetectedIssue extends DomainResource {
if (code == DetectedIssueStatus.UNKNOWN) if (code == DetectedIssueStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(DetectedIssueStatus code) { public String toSystem(DetectedIssueStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -342,14 +344,16 @@ public class DetectedIssue extends DomainResource {
throw new FHIRException("Unknown DetectedIssueSeverity code '"+codeString+"'"); throw new FHIRException("Unknown DetectedIssueSeverity code '"+codeString+"'");
} }
public String toCode(DetectedIssueSeverity code) { public String toCode(DetectedIssueSeverity code) {
if (code == DetectedIssueSeverity.HIGH) if (code == DetectedIssueSeverity.NULL)
return null;
if (code == DetectedIssueSeverity.HIGH)
return "high"; return "high";
if (code == DetectedIssueSeverity.MODERATE) if (code == DetectedIssueSeverity.MODERATE)
return "moderate"; return "moderate";
if (code == DetectedIssueSeverity.LOW) if (code == DetectedIssueSeverity.LOW)
return "low"; return "low";
return "?"; return "?";
} }
public String toSystem(DetectedIssueSeverity code) { public String toSystem(DetectedIssueSeverity code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -193,7 +193,9 @@ public class Device extends DomainResource {
throw new FHIRException("Unknown UDIEntryType code '"+codeString+"'"); throw new FHIRException("Unknown UDIEntryType code '"+codeString+"'");
} }
public String toCode(UDIEntryType code) { public String toCode(UDIEntryType code) {
if (code == UDIEntryType.BARCODE) if (code == UDIEntryType.NULL)
return null;
if (code == UDIEntryType.BARCODE)
return "barcode"; return "barcode";
if (code == UDIEntryType.RFID) if (code == UDIEntryType.RFID)
return "rfid"; return "rfid";
@ -206,7 +208,7 @@ public class Device extends DomainResource {
if (code == UDIEntryType.UNKNOWN) if (code == UDIEntryType.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(UDIEntryType code) { public String toSystem(UDIEntryType code) {
return code.getSystem(); return code.getSystem();
} }
@ -325,7 +327,9 @@ public class Device extends DomainResource {
throw new FHIRException("Unknown FHIRDeviceStatus code '"+codeString+"'"); throw new FHIRException("Unknown FHIRDeviceStatus code '"+codeString+"'");
} }
public String toCode(FHIRDeviceStatus code) { public String toCode(FHIRDeviceStatus code) {
if (code == FHIRDeviceStatus.ACTIVE) if (code == FHIRDeviceStatus.NULL)
return null;
if (code == FHIRDeviceStatus.ACTIVE)
return "active"; return "active";
if (code == FHIRDeviceStatus.INACTIVE) if (code == FHIRDeviceStatus.INACTIVE)
return "inactive"; return "inactive";
@ -334,7 +338,7 @@ public class Device extends DomainResource {
if (code == FHIRDeviceStatus.UNKNOWN) if (code == FHIRDeviceStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(FHIRDeviceStatus code) { public String toSystem(FHIRDeviceStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -262,7 +262,9 @@ public class DeviceComponent extends DomainResource {
throw new FHIRException("Unknown MeasmntPrinciple code '"+codeString+"'"); throw new FHIRException("Unknown MeasmntPrinciple code '"+codeString+"'");
} }
public String toCode(MeasmntPrinciple code) { public String toCode(MeasmntPrinciple code) {
if (code == MeasmntPrinciple.OTHER) if (code == MeasmntPrinciple.NULL)
return null;
if (code == MeasmntPrinciple.OTHER)
return "other"; return "other";
if (code == MeasmntPrinciple.CHEMICAL) if (code == MeasmntPrinciple.CHEMICAL)
return "chemical"; return "chemical";
@ -285,7 +287,7 @@ public class DeviceComponent extends DomainResource {
if (code == MeasmntPrinciple.MANUAL) if (code == MeasmntPrinciple.MANUAL)
return "manual"; return "manual";
return "?"; return "?";
} }
public String toSystem(MeasmntPrinciple code) { public String toSystem(MeasmntPrinciple code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -163,7 +163,9 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'"); throw new FHIRException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'");
} }
public String toCode(DeviceMetricOperationalStatus code) { public String toCode(DeviceMetricOperationalStatus code) {
if (code == DeviceMetricOperationalStatus.ON) if (code == DeviceMetricOperationalStatus.NULL)
return null;
if (code == DeviceMetricOperationalStatus.ON)
return "on"; return "on";
if (code == DeviceMetricOperationalStatus.OFF) if (code == DeviceMetricOperationalStatus.OFF)
return "off"; return "off";
@ -172,7 +174,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricOperationalStatus.ENTEREDINERROR) if (code == DeviceMetricOperationalStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(DeviceMetricOperationalStatus code) { public String toSystem(DeviceMetricOperationalStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -347,7 +349,9 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricColor code '"+codeString+"'"); throw new FHIRException("Unknown DeviceMetricColor code '"+codeString+"'");
} }
public String toCode(DeviceMetricColor code) { public String toCode(DeviceMetricColor code) {
if (code == DeviceMetricColor.BLACK) if (code == DeviceMetricColor.NULL)
return null;
if (code == DeviceMetricColor.BLACK)
return "black"; return "black";
if (code == DeviceMetricColor.RED) if (code == DeviceMetricColor.RED)
return "red"; return "red";
@ -364,7 +368,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricColor.WHITE) if (code == DeviceMetricColor.WHITE)
return "white"; return "white";
return "?"; return "?";
} }
public String toSystem(DeviceMetricColor code) { public String toSystem(DeviceMetricColor code) {
return code.getSystem(); return code.getSystem();
} }
@ -483,7 +487,9 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricCategory code '"+codeString+"'"); throw new FHIRException("Unknown DeviceMetricCategory code '"+codeString+"'");
} }
public String toCode(DeviceMetricCategory code) { public String toCode(DeviceMetricCategory code) {
if (code == DeviceMetricCategory.MEASUREMENT) if (code == DeviceMetricCategory.NULL)
return null;
if (code == DeviceMetricCategory.MEASUREMENT)
return "measurement"; return "measurement";
if (code == DeviceMetricCategory.SETTING) if (code == DeviceMetricCategory.SETTING)
return "setting"; return "setting";
@ -492,7 +498,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricCategory.UNSPECIFIED) if (code == DeviceMetricCategory.UNSPECIFIED)
return "unspecified"; return "unspecified";
return "?"; return "?";
} }
public String toSystem(DeviceMetricCategory code) { public String toSystem(DeviceMetricCategory code) {
return code.getSystem(); return code.getSystem();
} }
@ -611,7 +617,9 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricCalibrationType code '"+codeString+"'"); throw new FHIRException("Unknown DeviceMetricCalibrationType code '"+codeString+"'");
} }
public String toCode(DeviceMetricCalibrationType code) { public String toCode(DeviceMetricCalibrationType code) {
if (code == DeviceMetricCalibrationType.UNSPECIFIED) if (code == DeviceMetricCalibrationType.NULL)
return null;
if (code == DeviceMetricCalibrationType.UNSPECIFIED)
return "unspecified"; return "unspecified";
if (code == DeviceMetricCalibrationType.OFFSET) if (code == DeviceMetricCalibrationType.OFFSET)
return "offset"; return "offset";
@ -620,7 +628,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricCalibrationType.TWOPOINT) if (code == DeviceMetricCalibrationType.TWOPOINT)
return "two-point"; return "two-point";
return "?"; return "?";
} }
public String toSystem(DeviceMetricCalibrationType code) { public String toSystem(DeviceMetricCalibrationType code) {
return code.getSystem(); return code.getSystem();
} }
@ -739,7 +747,9 @@ public class DeviceMetric extends DomainResource {
throw new FHIRException("Unknown DeviceMetricCalibrationState code '"+codeString+"'"); throw new FHIRException("Unknown DeviceMetricCalibrationState code '"+codeString+"'");
} }
public String toCode(DeviceMetricCalibrationState code) { public String toCode(DeviceMetricCalibrationState code) {
if (code == DeviceMetricCalibrationState.NOTCALIBRATED) if (code == DeviceMetricCalibrationState.NULL)
return null;
if (code == DeviceMetricCalibrationState.NOTCALIBRATED)
return "not-calibrated"; return "not-calibrated";
if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED) if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED)
return "calibration-required"; return "calibration-required";
@ -748,7 +758,7 @@ public class DeviceMetric extends DomainResource {
if (code == DeviceMetricCalibrationState.UNSPECIFIED) if (code == DeviceMetricCalibrationState.UNSPECIFIED)
return "unspecified"; return "unspecified";
return "?"; return "?";
} }
public String toSystem(DeviceMetricCalibrationState code) { public String toSystem(DeviceMetricCalibrationState code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -206,7 +206,9 @@ public class DeviceRequest extends DomainResource {
throw new FHIRException("Unknown DeviceRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown DeviceRequestStatus code '"+codeString+"'");
} }
public String toCode(DeviceRequestStatus code) { public String toCode(DeviceRequestStatus code) {
if (code == DeviceRequestStatus.DRAFT) if (code == DeviceRequestStatus.NULL)
return null;
if (code == DeviceRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == DeviceRequestStatus.ACTIVE) if (code == DeviceRequestStatus.ACTIVE)
return "active"; return "active";
@ -221,7 +223,7 @@ public class DeviceRequest extends DomainResource {
if (code == DeviceRequestStatus.UNKNOWN) if (code == DeviceRequestStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(DeviceRequestStatus code) { public String toSystem(DeviceRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -340,7 +342,9 @@ public class DeviceRequest extends DomainResource {
throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
} }
public String toCode(RequestPriority code) { public String toCode(RequestPriority code) {
if (code == RequestPriority.ROUTINE) if (code == RequestPriority.NULL)
return null;
if (code == RequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == RequestPriority.URGENT) if (code == RequestPriority.URGENT)
return "urgent"; return "urgent";
@ -349,7 +353,7 @@ public class DeviceRequest extends DomainResource {
if (code == RequestPriority.STAT) if (code == RequestPriority.STAT)
return "stat"; return "stat";
return "?"; return "?";
} }
public String toSystem(RequestPriority code) { public String toSystem(RequestPriority code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -190,7 +190,9 @@ public class DeviceUseStatement extends DomainResource {
throw new FHIRException("Unknown DeviceUseStatementStatus code '"+codeString+"'"); throw new FHIRException("Unknown DeviceUseStatementStatus code '"+codeString+"'");
} }
public String toCode(DeviceUseStatementStatus code) { public String toCode(DeviceUseStatementStatus code) {
if (code == DeviceUseStatementStatus.ACTIVE) if (code == DeviceUseStatementStatus.NULL)
return null;
if (code == DeviceUseStatementStatus.ACTIVE)
return "active"; return "active";
if (code == DeviceUseStatementStatus.COMPLETED) if (code == DeviceUseStatementStatus.COMPLETED)
return "completed"; return "completed";
@ -203,7 +205,7 @@ public class DeviceUseStatement extends DomainResource {
if (code == DeviceUseStatementStatus.ONHOLD) if (code == DeviceUseStatementStatus.ONHOLD)
return "on-hold"; return "on-hold";
return "?"; return "?";
} }
public String toSystem(DeviceUseStatementStatus code) { public String toSystem(DeviceUseStatementStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -249,7 +249,9 @@ public class DiagnosticReport extends DomainResource {
throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'"); throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'");
} }
public String toCode(DiagnosticReportStatus code) { public String toCode(DiagnosticReportStatus code) {
if (code == DiagnosticReportStatus.REGISTERED) if (code == DiagnosticReportStatus.NULL)
return null;
if (code == DiagnosticReportStatus.REGISTERED)
return "registered"; return "registered";
if (code == DiagnosticReportStatus.PARTIAL) if (code == DiagnosticReportStatus.PARTIAL)
return "partial"; return "partial";
@ -270,7 +272,7 @@ public class DiagnosticReport extends DomainResource {
if (code == DiagnosticReportStatus.UNKNOWN) if (code == DiagnosticReportStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(DiagnosticReportStatus code) { public String toSystem(DiagnosticReportStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -166,7 +166,9 @@ public class DocumentReference extends DomainResource {
throw new FHIRException("Unknown ReferredDocumentStatus code '"+codeString+"'"); throw new FHIRException("Unknown ReferredDocumentStatus code '"+codeString+"'");
} }
public String toCode(ReferredDocumentStatus code) { public String toCode(ReferredDocumentStatus code) {
if (code == ReferredDocumentStatus.PRELIMINARY) if (code == ReferredDocumentStatus.NULL)
return null;
if (code == ReferredDocumentStatus.PRELIMINARY)
return "preliminary"; return "preliminary";
if (code == ReferredDocumentStatus.FINAL) if (code == ReferredDocumentStatus.FINAL)
return "final"; return "final";
@ -175,7 +177,7 @@ public class DocumentReference extends DomainResource {
if (code == ReferredDocumentStatus.ENTEREDINERROR) if (code == ReferredDocumentStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ReferredDocumentStatus code) { public String toSystem(ReferredDocumentStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -294,7 +296,9 @@ public class DocumentReference extends DomainResource {
throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'"); throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'");
} }
public String toCode(DocumentRelationshipType code) { public String toCode(DocumentRelationshipType code) {
if (code == DocumentRelationshipType.REPLACES) if (code == DocumentRelationshipType.NULL)
return null;
if (code == DocumentRelationshipType.REPLACES)
return "replaces"; return "replaces";
if (code == DocumentRelationshipType.TRANSFORMS) if (code == DocumentRelationshipType.TRANSFORMS)
return "transforms"; return "transforms";
@ -303,7 +307,7 @@ public class DocumentReference extends DomainResource {
if (code == DocumentRelationshipType.APPENDS) if (code == DocumentRelationshipType.APPENDS)
return "appends"; return "appends";
return "?"; return "?";
} }
public String toSystem(DocumentRelationshipType code) { public String toSystem(DocumentRelationshipType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -181,7 +181,9 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'");
} }
public String toCode(PropertyRepresentation code) { public String toCode(PropertyRepresentation code) {
if (code == PropertyRepresentation.XMLATTR) if (code == PropertyRepresentation.NULL)
return null;
if (code == PropertyRepresentation.XMLATTR)
return "xmlAttr"; return "xmlAttr";
if (code == PropertyRepresentation.XMLTEXT) if (code == PropertyRepresentation.XMLTEXT)
return "xmlText"; return "xmlText";
@ -192,7 +194,7 @@ public class ElementDefinition extends Type implements ICompositeType {
if (code == PropertyRepresentation.XHTML) if (code == PropertyRepresentation.XHTML)
return "xhtml"; return "xhtml";
return "?"; return "?";
} }
public String toSystem(PropertyRepresentation code) { public String toSystem(PropertyRepresentation code) {
return code.getSystem(); return code.getSystem();
} }
@ -325,7 +327,9 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'"); throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'");
} }
public String toCode(DiscriminatorType code) { public String toCode(DiscriminatorType code) {
if (code == DiscriminatorType.VALUE) if (code == DiscriminatorType.NULL)
return null;
if (code == DiscriminatorType.VALUE)
return "value"; return "value";
if (code == DiscriminatorType.EXISTS) if (code == DiscriminatorType.EXISTS)
return "exists"; return "exists";
@ -336,7 +340,7 @@ public class ElementDefinition extends Type implements ICompositeType {
if (code == DiscriminatorType.PROFILE) if (code == DiscriminatorType.PROFILE)
return "profile"; return "profile";
return "?"; return "?";
} }
public String toSystem(DiscriminatorType code) { public String toSystem(DiscriminatorType code) {
return code.getSystem(); return code.getSystem();
} }
@ -441,14 +445,16 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown SlicingRules code '"+codeString+"'"); throw new FHIRException("Unknown SlicingRules code '"+codeString+"'");
} }
public String toCode(SlicingRules code) { public String toCode(SlicingRules code) {
if (code == SlicingRules.CLOSED) if (code == SlicingRules.NULL)
return null;
if (code == SlicingRules.CLOSED)
return "closed"; return "closed";
if (code == SlicingRules.OPEN) if (code == SlicingRules.OPEN)
return "open"; return "open";
if (code == SlicingRules.OPENATEND) if (code == SlicingRules.OPENATEND)
return "openAtEnd"; return "openAtEnd";
return "?"; return "?";
} }
public String toSystem(SlicingRules code) { public String toSystem(SlicingRules code) {
return code.getSystem(); return code.getSystem();
} }
@ -553,14 +559,16 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown AggregationMode code '"+codeString+"'"); throw new FHIRException("Unknown AggregationMode code '"+codeString+"'");
} }
public String toCode(AggregationMode code) { public String toCode(AggregationMode code) {
if (code == AggregationMode.CONTAINED) if (code == AggregationMode.NULL)
return null;
if (code == AggregationMode.CONTAINED)
return "contained"; return "contained";
if (code == AggregationMode.REFERENCED) if (code == AggregationMode.REFERENCED)
return "referenced"; return "referenced";
if (code == AggregationMode.BUNDLED) if (code == AggregationMode.BUNDLED)
return "bundled"; return "bundled";
return "?"; return "?";
} }
public String toSystem(AggregationMode code) { public String toSystem(AggregationMode code) {
return code.getSystem(); return code.getSystem();
} }
@ -665,14 +673,16 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'"); throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'");
} }
public String toCode(ReferenceVersionRules code) { public String toCode(ReferenceVersionRules code) {
if (code == ReferenceVersionRules.EITHER) if (code == ReferenceVersionRules.NULL)
return null;
if (code == ReferenceVersionRules.EITHER)
return "either"; return "either";
if (code == ReferenceVersionRules.INDEPENDENT) if (code == ReferenceVersionRules.INDEPENDENT)
return "independent"; return "independent";
if (code == ReferenceVersionRules.SPECIFIC) if (code == ReferenceVersionRules.SPECIFIC)
return "specific"; return "specific";
return "?"; return "?";
} }
public String toSystem(ReferenceVersionRules code) { public String toSystem(ReferenceVersionRules code) {
return code.getSystem(); return code.getSystem();
} }
@ -763,12 +773,14 @@ public class ElementDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'"); throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'");
} }
public String toCode(ConstraintSeverity code) { public String toCode(ConstraintSeverity code) {
if (code == ConstraintSeverity.ERROR) if (code == ConstraintSeverity.NULL)
return null;
if (code == ConstraintSeverity.ERROR)
return "error"; return "error";
if (code == ConstraintSeverity.WARNING) if (code == ConstraintSeverity.WARNING)
return "warning"; return "warning";
return "?"; return "?";
} }
public String toSystem(ConstraintSeverity code) { public String toSystem(ConstraintSeverity code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -163,7 +163,9 @@ public class EligibilityRequest extends DomainResource {
throw new FHIRException("Unknown EligibilityRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown EligibilityRequestStatus code '"+codeString+"'");
} }
public String toCode(EligibilityRequestStatus code) { public String toCode(EligibilityRequestStatus code) {
if (code == EligibilityRequestStatus.ACTIVE) if (code == EligibilityRequestStatus.NULL)
return null;
if (code == EligibilityRequestStatus.ACTIVE)
return "active"; return "active";
if (code == EligibilityRequestStatus.CANCELLED) if (code == EligibilityRequestStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -172,7 +174,7 @@ public class EligibilityRequest extends DomainResource {
if (code == EligibilityRequestStatus.ENTEREDINERROR) if (code == EligibilityRequestStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(EligibilityRequestStatus code) { public String toSystem(EligibilityRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -165,7 +165,9 @@ public class EligibilityResponse extends DomainResource {
throw new FHIRException("Unknown EligibilityResponseStatus code '"+codeString+"'"); throw new FHIRException("Unknown EligibilityResponseStatus code '"+codeString+"'");
} }
public String toCode(EligibilityResponseStatus code) { public String toCode(EligibilityResponseStatus code) {
if (code == EligibilityResponseStatus.ACTIVE) if (code == EligibilityResponseStatus.NULL)
return null;
if (code == EligibilityResponseStatus.ACTIVE)
return "active"; return "active";
if (code == EligibilityResponseStatus.CANCELLED) if (code == EligibilityResponseStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -174,7 +176,7 @@ public class EligibilityResponse extends DomainResource {
if (code == EligibilityResponseStatus.ENTEREDINERROR) if (code == EligibilityResponseStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(EligibilityResponseStatus code) { public String toSystem(EligibilityResponseStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -232,7 +232,9 @@ public class Encounter extends DomainResource {
throw new FHIRException("Unknown EncounterStatus code '"+codeString+"'"); throw new FHIRException("Unknown EncounterStatus code '"+codeString+"'");
} }
public String toCode(EncounterStatus code) { public String toCode(EncounterStatus code) {
if (code == EncounterStatus.PLANNED) if (code == EncounterStatus.NULL)
return null;
if (code == EncounterStatus.PLANNED)
return "planned"; return "planned";
if (code == EncounterStatus.ARRIVED) if (code == EncounterStatus.ARRIVED)
return "arrived"; return "arrived";
@ -251,7 +253,7 @@ public class Encounter extends DomainResource {
if (code == EncounterStatus.UNKNOWN) if (code == EncounterStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(EncounterStatus code) { public String toSystem(EncounterStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -374,7 +376,9 @@ Not to be used when the patient is currently at the location
throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'");
} }
public String toCode(EncounterLocationStatus code) { public String toCode(EncounterLocationStatus code) {
if (code == EncounterLocationStatus.PLANNED) if (code == EncounterLocationStatus.NULL)
return null;
if (code == EncounterLocationStatus.PLANNED)
return "planned"; return "planned";
if (code == EncounterLocationStatus.ACTIVE) if (code == EncounterLocationStatus.ACTIVE)
return "active"; return "active";
@ -383,7 +387,7 @@ Not to be used when the patient is currently at the location
if (code == EncounterLocationStatus.COMPLETED) if (code == EncounterLocationStatus.COMPLETED)
return "completed"; return "completed";
return "?"; return "?";
} }
public String toSystem(EncounterLocationStatus code) { public String toSystem(EncounterLocationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -189,7 +189,9 @@ public class Endpoint extends DomainResource {
throw new FHIRException("Unknown EndpointStatus code '"+codeString+"'"); throw new FHIRException("Unknown EndpointStatus code '"+codeString+"'");
} }
public String toCode(EndpointStatus code) { public String toCode(EndpointStatus code) {
if (code == EndpointStatus.ACTIVE) if (code == EndpointStatus.NULL)
return null;
if (code == EndpointStatus.ACTIVE)
return "active"; return "active";
if (code == EndpointStatus.SUSPENDED) if (code == EndpointStatus.SUSPENDED)
return "suspended"; return "suspended";
@ -202,7 +204,7 @@ public class Endpoint extends DomainResource {
if (code == EndpointStatus.TEST) if (code == EndpointStatus.TEST)
return "test"; return "test";
return "?"; return "?";
} }
public String toSystem(EndpointStatus code) { public String toSystem(EndpointStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -161,7 +161,9 @@ public class EnrollmentRequest extends DomainResource {
throw new FHIRException("Unknown EnrollmentRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown EnrollmentRequestStatus code '"+codeString+"'");
} }
public String toCode(EnrollmentRequestStatus code) { public String toCode(EnrollmentRequestStatus code) {
if (code == EnrollmentRequestStatus.ACTIVE) if (code == EnrollmentRequestStatus.NULL)
return null;
if (code == EnrollmentRequestStatus.ACTIVE)
return "active"; return "active";
if (code == EnrollmentRequestStatus.CANCELLED) if (code == EnrollmentRequestStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -170,7 +172,7 @@ public class EnrollmentRequest extends DomainResource {
if (code == EnrollmentRequestStatus.ENTEREDINERROR) if (code == EnrollmentRequestStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(EnrollmentRequestStatus code) { public String toSystem(EnrollmentRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -162,7 +162,9 @@ public class EnrollmentResponse extends DomainResource {
throw new FHIRException("Unknown EnrollmentResponseStatus code '"+codeString+"'"); throw new FHIRException("Unknown EnrollmentResponseStatus code '"+codeString+"'");
} }
public String toCode(EnrollmentResponseStatus code) { public String toCode(EnrollmentResponseStatus code) {
if (code == EnrollmentResponseStatus.ACTIVE) if (code == EnrollmentResponseStatus.NULL)
return null;
if (code == EnrollmentResponseStatus.ACTIVE)
return "active"; return "active";
if (code == EnrollmentResponseStatus.CANCELLED) if (code == EnrollmentResponseStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -171,7 +173,7 @@ public class EnrollmentResponse extends DomainResource {
if (code == EnrollmentResponseStatus.ENTEREDINERROR) if (code == EnrollmentResponseStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(EnrollmentResponseStatus code) { public String toSystem(EnrollmentResponseStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -136,12 +136,14 @@ public class Enumerations {
throw new FHIRException("Unknown AbstractType code '"+codeString+"'"); throw new FHIRException("Unknown AbstractType code '"+codeString+"'");
} }
public String toCode(AbstractType code) { public String toCode(AbstractType code) {
if (code == AbstractType.TYPE) if (code == AbstractType.NULL)
return null;
if (code == AbstractType.TYPE)
return "Type"; return "Type";
if (code == AbstractType.ANY) if (code == AbstractType.ANY)
return "Any"; return "Any";
return "?"; return "?";
} }
public String toSystem(AbstractType code) { public String toSystem(AbstractType code) {
return code.getSystem(); return code.getSystem();
} }
@ -257,7 +259,9 @@ public class Enumerations {
throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'"); throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
} }
public String toCode(AdministrativeGender code) { public String toCode(AdministrativeGender code) {
if (code == AdministrativeGender.MALE) if (code == AdministrativeGender.NULL)
return null;
if (code == AdministrativeGender.MALE)
return "male"; return "male";
if (code == AdministrativeGender.FEMALE) if (code == AdministrativeGender.FEMALE)
return "female"; return "female";
@ -266,7 +270,7 @@ public class Enumerations {
if (code == AdministrativeGender.UNKNOWN) if (code == AdministrativeGender.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(AdministrativeGender code) { public String toSystem(AdministrativeGender code) {
return code.getSystem(); return code.getSystem();
} }
@ -410,7 +414,9 @@ public class Enumerations {
throw new FHIRException("Unknown AgeUnits code '"+codeString+"'"); throw new FHIRException("Unknown AgeUnits code '"+codeString+"'");
} }
public String toCode(AgeUnits code) { public String toCode(AgeUnits code) {
if (code == AgeUnits.MIN) if (code == AgeUnits.NULL)
return null;
if (code == AgeUnits.MIN)
return "min"; return "min";
if (code == AgeUnits.H) if (code == AgeUnits.H)
return "h"; return "h";
@ -423,7 +429,7 @@ public class Enumerations {
if (code == AgeUnits.A) if (code == AgeUnits.A)
return "a"; return "a";
return "?"; return "?";
} }
public String toSystem(AgeUnits code) { public String toSystem(AgeUnits code) {
return code.getSystem(); return code.getSystem();
} }
@ -539,7 +545,9 @@ public class Enumerations {
throw new FHIRException("Unknown BindingStrength code '"+codeString+"'"); throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
} }
public String toCode(BindingStrength code) { public String toCode(BindingStrength code) {
if (code == BindingStrength.REQUIRED) if (code == BindingStrength.NULL)
return null;
if (code == BindingStrength.REQUIRED)
return "required"; return "required";
if (code == BindingStrength.EXTENSIBLE) if (code == BindingStrength.EXTENSIBLE)
return "extensible"; return "extensible";
@ -548,7 +556,7 @@ public class Enumerations {
if (code == BindingStrength.EXAMPLE) if (code == BindingStrength.EXAMPLE)
return "example"; return "example";
return "?"; return "?";
} }
public String toSystem(BindingStrength code) { public String toSystem(BindingStrength code) {
return code.getSystem(); return code.getSystem();
} }
@ -748,7 +756,9 @@ public class Enumerations {
throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'"); throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
} }
public String toCode(ConceptMapEquivalence code) { public String toCode(ConceptMapEquivalence code) {
if (code == ConceptMapEquivalence.RELATEDTO) if (code == ConceptMapEquivalence.NULL)
return null;
if (code == ConceptMapEquivalence.RELATEDTO)
return "relatedto"; return "relatedto";
if (code == ConceptMapEquivalence.EQUIVALENT) if (code == ConceptMapEquivalence.EQUIVALENT)
return "equivalent"; return "equivalent";
@ -769,7 +779,7 @@ public class Enumerations {
if (code == ConceptMapEquivalence.DISJOINT) if (code == ConceptMapEquivalence.DISJOINT)
return "disjoint"; return "disjoint";
return "?"; return "?";
} }
public String toSystem(ConceptMapEquivalence code) { public String toSystem(ConceptMapEquivalence code) {
return code.getSystem(); return code.getSystem();
} }
@ -969,7 +979,9 @@ public class Enumerations {
throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'"); throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
} }
public String toCode(DataAbsentReason code) { public String toCode(DataAbsentReason code) {
if (code == DataAbsentReason.UNKNOWN) if (code == DataAbsentReason.NULL)
return null;
if (code == DataAbsentReason.UNKNOWN)
return "unknown"; return "unknown";
if (code == DataAbsentReason.ASKED) if (code == DataAbsentReason.ASKED)
return "asked"; return "asked";
@ -990,7 +1002,7 @@ public class Enumerations {
if (code == DataAbsentReason.NOTPERFORMED) if (code == DataAbsentReason.NOTPERFORMED)
return "not-performed"; return "not-performed";
return "?"; return "?";
} }
public String toSystem(DataAbsentReason code) { public String toSystem(DataAbsentReason code) {
return code.getSystem(); return code.getSystem();
} }
@ -1806,7 +1818,9 @@ public class Enumerations {
throw new FHIRException("Unknown DataType code '"+codeString+"'"); throw new FHIRException("Unknown DataType code '"+codeString+"'");
} }
public String toCode(DataType code) { public String toCode(DataType code) {
if (code == DataType.ADDRESS) if (code == DataType.NULL)
return null;
if (code == DataType.ADDRESS)
return "Address"; return "Address";
if (code == DataType.AGE) if (code == DataType.AGE)
return "Age"; return "Age";
@ -1915,7 +1929,7 @@ public class Enumerations {
if (code == DataType.XHTML) if (code == DataType.XHTML)
return "xhtml"; return "xhtml";
return "?"; return "?";
} }
public String toSystem(DataType code) { public String toSystem(DataType code) {
return code.getSystem(); return code.getSystem();
} }
@ -2017,14 +2031,16 @@ public class Enumerations {
throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'"); throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
} }
public String toCode(DocumentReferenceStatus code) { public String toCode(DocumentReferenceStatus code) {
if (code == DocumentReferenceStatus.CURRENT) if (code == DocumentReferenceStatus.NULL)
return null;
if (code == DocumentReferenceStatus.CURRENT)
return "current"; return "current";
if (code == DocumentReferenceStatus.SUPERSEDED) if (code == DocumentReferenceStatus.SUPERSEDED)
return "superseded"; return "superseded";
if (code == DocumentReferenceStatus.ENTEREDINERROR) if (code == DocumentReferenceStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(DocumentReferenceStatus code) { public String toSystem(DocumentReferenceStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -4536,7 +4552,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'"); throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
} }
public String toCode(FHIRAllTypes code) { public String toCode(FHIRAllTypes code) {
if (code == FHIRAllTypes.ADDRESS) if (code == FHIRAllTypes.NULL)
return null;
if (code == FHIRAllTypes.ADDRESS)
return "Address"; return "Address";
if (code == FHIRAllTypes.AGE) if (code == FHIRAllTypes.AGE)
return "Age"; return "Age";
@ -4887,7 +4905,7 @@ The primary difference between a medication statement and a medication administr
if (code == FHIRAllTypes.ANY) if (code == FHIRAllTypes.ANY)
return "Any"; return "Any";
return "?"; return "?";
} }
public String toSystem(FHIRAllTypes code) { public String toSystem(FHIRAllTypes code) {
return code.getSystem(); return code.getSystem();
} }
@ -7371,7 +7389,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'"); throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
} }
public String toCode(FHIRDefinedType code) { public String toCode(FHIRDefinedType code) {
if (code == FHIRDefinedType.ADDRESS) if (code == FHIRDefinedType.NULL)
return null;
if (code == FHIRDefinedType.ADDRESS)
return "Address"; return "Address";
if (code == FHIRDefinedType.AGE) if (code == FHIRDefinedType.AGE)
return "Age"; return "Age";
@ -7718,7 +7738,7 @@ The primary difference between a medication statement and a medication administr
if (code == FHIRDefinedType.VISIONPRESCRIPTION) if (code == FHIRDefinedType.VISIONPRESCRIPTION)
return "VisionPrescription"; return "VisionPrescription";
return "?"; return "?";
} }
public String toSystem(FHIRDefinedType code) { public String toSystem(FHIRDefinedType code) {
return code.getSystem(); return code.getSystem();
} }
@ -7946,7 +7966,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown MessageEvent code '"+codeString+"'"); throw new FHIRException("Unknown MessageEvent code '"+codeString+"'");
} }
public String toCode(MessageEvent code) { public String toCode(MessageEvent code) {
if (code == MessageEvent.CODESYSTEMEXPAND) if (code == MessageEvent.NULL)
return null;
if (code == MessageEvent.CODESYSTEMEXPAND)
return "CodeSystem-expand"; return "CodeSystem-expand";
if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE) if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE)
return "MedicationAdministration-Complete"; return "MedicationAdministration-Complete";
@ -7971,7 +7993,7 @@ The primary difference between a medication statement and a medication administr
if (code == MessageEvent.VALUESETEXPAND) if (code == MessageEvent.VALUESETEXPAND)
return "valueset-expand"; return "valueset-expand";
return "?"; return "?";
} }
public String toSystem(MessageEvent code) { public String toSystem(MessageEvent code) {
return code.getSystem(); return code.getSystem();
} }
@ -8073,14 +8095,16 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown NoteType code '"+codeString+"'"); throw new FHIRException("Unknown NoteType code '"+codeString+"'");
} }
public String toCode(NoteType code) { public String toCode(NoteType code) {
if (code == NoteType.DISPLAY) if (code == NoteType.NULL)
return null;
if (code == NoteType.DISPLAY)
return "display"; return "display";
if (code == NoteType.PRINT) if (code == NoteType.PRINT)
return "print"; return "print";
if (code == NoteType.PRINTOPER) if (code == NoteType.PRINTOPER)
return "printoper"; return "printoper";
return "?"; return "?";
} }
public String toSystem(NoteType code) { public String toSystem(NoteType code) {
return code.getSystem(); return code.getSystem();
} }
@ -8196,7 +8220,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'"); throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
} }
public String toCode(PublicationStatus code) { public String toCode(PublicationStatus code) {
if (code == PublicationStatus.DRAFT) if (code == PublicationStatus.NULL)
return null;
if (code == PublicationStatus.DRAFT)
return "draft"; return "draft";
if (code == PublicationStatus.ACTIVE) if (code == PublicationStatus.ACTIVE)
return "active"; return "active";
@ -8205,7 +8231,7 @@ The primary difference between a medication statement and a medication administr
if (code == PublicationStatus.UNKNOWN) if (code == PublicationStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(PublicationStatus code) { public String toSystem(PublicationStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -8307,14 +8333,16 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'"); throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
} }
public String toCode(RemittanceOutcome code) { public String toCode(RemittanceOutcome code) {
if (code == RemittanceOutcome.COMPLETE) if (code == RemittanceOutcome.NULL)
return null;
if (code == RemittanceOutcome.COMPLETE)
return "complete"; return "complete";
if (code == RemittanceOutcome.ERROR) if (code == RemittanceOutcome.ERROR)
return "error"; return "error";
if (code == RemittanceOutcome.PARTIAL) if (code == RemittanceOutcome.PARTIAL)
return "partial"; return "partial";
return "?"; return "?";
} }
public String toSystem(RemittanceOutcome code) { public String toSystem(RemittanceOutcome code) {
return code.getSystem(); return code.getSystem();
} }
@ -10042,7 +10070,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown ResourceType code '"+codeString+"'"); throw new FHIRException("Unknown ResourceType code '"+codeString+"'");
} }
public String toCode(ResourceType code) { public String toCode(ResourceType code) {
if (code == ResourceType.ACCOUNT) if (code == ResourceType.NULL)
return null;
if (code == ResourceType.ACCOUNT)
return "Account"; return "Account";
if (code == ResourceType.ACTIVITYDEFINITION) if (code == ResourceType.ACTIVITYDEFINITION)
return "ActivityDefinition"; return "ActivityDefinition";
@ -10281,7 +10311,7 @@ The primary difference between a medication statement and a medication administr
if (code == ResourceType.VISIONPRESCRIPTION) if (code == ResourceType.VISIONPRESCRIPTION)
return "VisionPrescription"; return "VisionPrescription";
return "?"; return "?";
} }
public String toSystem(ResourceType code) { public String toSystem(ResourceType code) {
return code.getSystem(); return code.getSystem();
} }
@ -10453,7 +10483,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown SearchParamType code '"+codeString+"'"); throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
} }
public String toCode(SearchParamType code) { public String toCode(SearchParamType code) {
if (code == SearchParamType.NUMBER) if (code == SearchParamType.NULL)
return null;
if (code == SearchParamType.NUMBER)
return "number"; return "number";
if (code == SearchParamType.DATE) if (code == SearchParamType.DATE)
return "date"; return "date";
@ -10470,7 +10502,7 @@ The primary difference between a medication statement and a medication administr
if (code == SearchParamType.URI) if (code == SearchParamType.URI)
return "uri"; return "uri";
return "?"; return "?";
} }
public String toSystem(SearchParamType code) { public String toSystem(SearchParamType code) {
return code.getSystem(); return code.getSystem();
} }
@ -10614,7 +10646,9 @@ The primary difference between a medication statement and a medication administr
throw new FHIRException("Unknown SpecialValues code '"+codeString+"'"); throw new FHIRException("Unknown SpecialValues code '"+codeString+"'");
} }
public String toCode(SpecialValues code) { public String toCode(SpecialValues code) {
if (code == SpecialValues.TRUE) if (code == SpecialValues.NULL)
return null;
if (code == SpecialValues.TRUE)
return "true"; return "true";
if (code == SpecialValues.FALSE) if (code == SpecialValues.FALSE)
return "false"; return "false";
@ -10627,7 +10661,7 @@ The primary difference between a medication statement and a medication administr
if (code == SpecialValues.NILKNOWN) if (code == SpecialValues.NILKNOWN)
return "nil-known"; return "nil-known";
return "?"; return "?";
} }
public String toSystem(SpecialValues code) { public String toSystem(SpecialValues code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -204,7 +204,9 @@ public class EpisodeOfCare extends DomainResource {
throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'");
} }
public String toCode(EpisodeOfCareStatus code) { public String toCode(EpisodeOfCareStatus code) {
if (code == EpisodeOfCareStatus.PLANNED) if (code == EpisodeOfCareStatus.NULL)
return null;
if (code == EpisodeOfCareStatus.PLANNED)
return "planned"; return "planned";
if (code == EpisodeOfCareStatus.WAITLIST) if (code == EpisodeOfCareStatus.WAITLIST)
return "waitlist"; return "waitlist";
@ -219,7 +221,7 @@ public class EpisodeOfCare extends DomainResource {
if (code == EpisodeOfCareStatus.ENTEREDINERROR) if (code == EpisodeOfCareStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(EpisodeOfCareStatus code) { public String toSystem(EpisodeOfCareStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -154,14 +154,16 @@ public class ExpansionProfile extends MetadataResource {
throw new FHIRException("Unknown SystemVersionProcessingMode code '"+codeString+"'"); throw new FHIRException("Unknown SystemVersionProcessingMode code '"+codeString+"'");
} }
public String toCode(SystemVersionProcessingMode code) { public String toCode(SystemVersionProcessingMode code) {
if (code == SystemVersionProcessingMode.DEFAULT) if (code == SystemVersionProcessingMode.NULL)
return null;
if (code == SystemVersionProcessingMode.DEFAULT)
return "default"; return "default";
if (code == SystemVersionProcessingMode.CHECK) if (code == SystemVersionProcessingMode.CHECK)
return "check"; return "check";
if (code == SystemVersionProcessingMode.OVERRIDE) if (code == SystemVersionProcessingMode.OVERRIDE)
return "override"; return "override";
return "?"; return "?";
} }
public String toSystem(SystemVersionProcessingMode code) { public String toSystem(SystemVersionProcessingMode code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -165,7 +165,9 @@ public class ExplanationOfBenefit extends DomainResource {
throw new FHIRException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'"); throw new FHIRException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'");
} }
public String toCode(ExplanationOfBenefitStatus code) { public String toCode(ExplanationOfBenefitStatus code) {
if (code == ExplanationOfBenefitStatus.ACTIVE) if (code == ExplanationOfBenefitStatus.NULL)
return null;
if (code == ExplanationOfBenefitStatus.ACTIVE)
return "active"; return "active";
if (code == ExplanationOfBenefitStatus.CANCELLED) if (code == ExplanationOfBenefitStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -174,7 +176,7 @@ public class ExplanationOfBenefit extends DomainResource {
if (code == ExplanationOfBenefitStatus.ENTEREDINERROR) if (code == ExplanationOfBenefitStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ExplanationOfBenefitStatus code) { public String toSystem(ExplanationOfBenefitStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -167,7 +167,9 @@ public class FamilyMemberHistory extends DomainResource {
throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'"); throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'");
} }
public String toCode(FamilyHistoryStatus code) { public String toCode(FamilyHistoryStatus code) {
if (code == FamilyHistoryStatus.PARTIAL) if (code == FamilyHistoryStatus.NULL)
return null;
if (code == FamilyHistoryStatus.PARTIAL)
return "partial"; return "partial";
if (code == FamilyHistoryStatus.COMPLETED) if (code == FamilyHistoryStatus.COMPLETED)
return "completed"; return "completed";
@ -176,7 +178,7 @@ public class FamilyMemberHistory extends DomainResource {
if (code == FamilyHistoryStatus.HEALTHUNKNOWN) if (code == FamilyHistoryStatus.HEALTHUNKNOWN)
return "health-unknown"; return "health-unknown";
return "?"; return "?";
} }
public String toSystem(FamilyHistoryStatus code) { public String toSystem(FamilyHistoryStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

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

View File

@ -291,7 +291,9 @@ public class Goal extends DomainResource {
throw new FHIRException("Unknown GoalStatus code '"+codeString+"'"); throw new FHIRException("Unknown GoalStatus code '"+codeString+"'");
} }
public String toCode(GoalStatus code) { public String toCode(GoalStatus code) {
if (code == GoalStatus.PROPOSED) if (code == GoalStatus.NULL)
return null;
if (code == GoalStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == GoalStatus.ACCEPTED) if (code == GoalStatus.ACCEPTED)
return "accepted"; return "accepted";
@ -318,7 +320,7 @@ public class Goal extends DomainResource {
if (code == GoalStatus.REJECTED) if (code == GoalStatus.REJECTED)
return "rejected"; return "rejected";
return "?"; return "?";
} }
public String toSystem(GoalStatus code) { public String toSystem(GoalStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -183,7 +183,9 @@ public class GraphDefinition extends MetadataResource {
throw new FHIRException("Unknown CompartmentCode code '"+codeString+"'"); throw new FHIRException("Unknown CompartmentCode code '"+codeString+"'");
} }
public String toCode(CompartmentCode code) { public String toCode(CompartmentCode code) {
if (code == CompartmentCode.PATIENT) if (code == CompartmentCode.NULL)
return null;
if (code == CompartmentCode.PATIENT)
return "Patient"; return "Patient";
if (code == CompartmentCode.ENCOUNTER) if (code == CompartmentCode.ENCOUNTER)
return "Encounter"; return "Encounter";
@ -194,7 +196,7 @@ public class GraphDefinition extends MetadataResource {
if (code == CompartmentCode.DEVICE) if (code == CompartmentCode.DEVICE)
return "Device"; return "Device";
return "?"; return "?";
} }
public String toSystem(CompartmentCode code) { public String toSystem(CompartmentCode code) {
return code.getSystem(); return code.getSystem();
} }
@ -313,7 +315,9 @@ public class GraphDefinition extends MetadataResource {
throw new FHIRException("Unknown GraphCompartmentRule code '"+codeString+"'"); throw new FHIRException("Unknown GraphCompartmentRule code '"+codeString+"'");
} }
public String toCode(GraphCompartmentRule code) { public String toCode(GraphCompartmentRule code) {
if (code == GraphCompartmentRule.IDENTICAL) if (code == GraphCompartmentRule.NULL)
return null;
if (code == GraphCompartmentRule.IDENTICAL)
return "identical"; return "identical";
if (code == GraphCompartmentRule.MATCHING) if (code == GraphCompartmentRule.MATCHING)
return "matching"; return "matching";
@ -322,7 +326,7 @@ public class GraphDefinition extends MetadataResource {
if (code == GraphCompartmentRule.CUSTOM) if (code == GraphCompartmentRule.CUSTOM)
return "custom"; return "custom";
return "?"; return "?";
} }
public String toSystem(GraphCompartmentRule code) { public String toSystem(GraphCompartmentRule code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -192,7 +192,9 @@ public class Group extends DomainResource {
throw new FHIRException("Unknown GroupType code '"+codeString+"'"); throw new FHIRException("Unknown GroupType code '"+codeString+"'");
} }
public String toCode(GroupType code) { public String toCode(GroupType code) {
if (code == GroupType.PERSON) if (code == GroupType.NULL)
return null;
if (code == GroupType.PERSON)
return "person"; return "person";
if (code == GroupType.ANIMAL) if (code == GroupType.ANIMAL)
return "animal"; return "animal";
@ -205,7 +207,7 @@ public class Group extends DomainResource {
if (code == GroupType.SUBSTANCE) if (code == GroupType.SUBSTANCE)
return "substance"; return "substance";
return "?"; return "?";
} }
public String toSystem(GroupType code) { public String toSystem(GroupType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -191,7 +191,9 @@ public class GuidanceResponse extends DomainResource {
throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'"); throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'");
} }
public String toCode(GuidanceResponseStatus code) { public String toCode(GuidanceResponseStatus code) {
if (code == GuidanceResponseStatus.SUCCESS) if (code == GuidanceResponseStatus.NULL)
return null;
if (code == GuidanceResponseStatus.SUCCESS)
return "success"; return "success";
if (code == GuidanceResponseStatus.DATAREQUESTED) if (code == GuidanceResponseStatus.DATAREQUESTED)
return "data-requested"; return "data-requested";
@ -204,7 +206,7 @@ public class GuidanceResponse extends DomainResource {
if (code == GuidanceResponseStatus.ENTEREDINERROR) if (code == GuidanceResponseStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(GuidanceResponseStatus code) { public String toSystem(GuidanceResponseStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -206,7 +206,9 @@ public class HealthcareService extends DomainResource {
throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
} }
public String toCode(DaysOfWeek code) { public String toCode(DaysOfWeek code) {
if (code == DaysOfWeek.MON) if (code == DaysOfWeek.NULL)
return null;
if (code == DaysOfWeek.MON)
return "mon"; return "mon";
if (code == DaysOfWeek.TUE) if (code == DaysOfWeek.TUE)
return "tue"; return "tue";
@ -221,7 +223,7 @@ public class HealthcareService extends DomainResource {
if (code == DaysOfWeek.SUN) if (code == DaysOfWeek.SUN)
return "sun"; return "sun";
return "?"; return "?";
} }
public String toSystem(DaysOfWeek code) { public String toSystem(DaysOfWeek code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -205,7 +205,9 @@ public class HumanName extends Type implements ICompositeType {
throw new FHIRException("Unknown NameUse code '"+codeString+"'"); throw new FHIRException("Unknown NameUse code '"+codeString+"'");
} }
public String toCode(NameUse code) { public String toCode(NameUse code) {
if (code == NameUse.USUAL) if (code == NameUse.NULL)
return null;
if (code == NameUse.USUAL)
return "usual"; return "usual";
if (code == NameUse.OFFICIAL) if (code == NameUse.OFFICIAL)
return "official"; return "official";
@ -220,7 +222,7 @@ public class HumanName extends Type implements ICompositeType {
if (code == NameUse.MAIDEN) if (code == NameUse.MAIDEN)
return "maiden"; return "maiden";
return "?"; return "?";
} }
public String toSystem(NameUse code) { public String toSystem(NameUse code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -160,7 +160,9 @@ public class Identifier extends Type implements ICompositeType {
throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'"); throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'");
} }
public String toCode(IdentifierUse code) { public String toCode(IdentifierUse code) {
if (code == IdentifierUse.USUAL) if (code == IdentifierUse.NULL)
return null;
if (code == IdentifierUse.USUAL)
return "usual"; return "usual";
if (code == IdentifierUse.OFFICIAL) if (code == IdentifierUse.OFFICIAL)
return "official"; return "official";
@ -169,7 +171,7 @@ public class Identifier extends Type implements ICompositeType {
if (code == IdentifierUse.SECONDARY) if (code == IdentifierUse.SECONDARY)
return "secondary"; return "secondary";
return "?"; return "?";
} }
public String toSystem(IdentifierUse code) { public String toSystem(IdentifierUse code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -164,7 +164,9 @@ public class ImagingStudy extends DomainResource {
throw new FHIRException("Unknown InstanceAvailability code '"+codeString+"'"); throw new FHIRException("Unknown InstanceAvailability code '"+codeString+"'");
} }
public String toCode(InstanceAvailability code) { public String toCode(InstanceAvailability code) {
if (code == InstanceAvailability.ONLINE) if (code == InstanceAvailability.NULL)
return null;
if (code == InstanceAvailability.ONLINE)
return "ONLINE"; return "ONLINE";
if (code == InstanceAvailability.OFFLINE) if (code == InstanceAvailability.OFFLINE)
return "OFFLINE"; return "OFFLINE";
@ -173,7 +175,7 @@ public class ImagingStudy extends DomainResource {
if (code == InstanceAvailability.UNAVAILABLE) if (code == InstanceAvailability.UNAVAILABLE)
return "UNAVAILABLE"; return "UNAVAILABLE";
return "?"; return "?";
} }
public String toSystem(InstanceAvailability code) { public String toSystem(InstanceAvailability code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -136,12 +136,14 @@ public class Immunization extends DomainResource {
throw new FHIRException("Unknown ImmunizationStatus code '"+codeString+"'"); throw new FHIRException("Unknown ImmunizationStatus code '"+codeString+"'");
} }
public String toCode(ImmunizationStatus code) { public String toCode(ImmunizationStatus code) {
if (code == ImmunizationStatus.COMPLETED) if (code == ImmunizationStatus.NULL)
return null;
if (code == ImmunizationStatus.COMPLETED)
return "completed"; return "completed";
if (code == ImmunizationStatus.ENTEREDINERROR) if (code == ImmunizationStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ImmunizationStatus code) { public String toSystem(ImmunizationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -141,12 +141,14 @@ public class ImplementationGuide extends MetadataResource {
throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'"); throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'");
} }
public String toCode(GuideDependencyType code) { public String toCode(GuideDependencyType code) {
if (code == GuideDependencyType.REFERENCE) if (code == GuideDependencyType.NULL)
return null;
if (code == GuideDependencyType.REFERENCE)
return "reference"; return "reference";
if (code == GuideDependencyType.INCLUSION) if (code == GuideDependencyType.INCLUSION)
return "inclusion"; return "inclusion";
return "?"; return "?";
} }
public String toSystem(GuideDependencyType code) { public String toSystem(GuideDependencyType code) {
return code.getSystem(); return code.getSystem();
} }
@ -321,7 +323,9 @@ public class ImplementationGuide extends MetadataResource {
throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'"); throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'");
} }
public String toCode(GuidePageKind code) { public String toCode(GuidePageKind code) {
if (code == GuidePageKind.PAGE) if (code == GuidePageKind.NULL)
return null;
if (code == GuidePageKind.PAGE)
return "page"; return "page";
if (code == GuidePageKind.EXAMPLE) if (code == GuidePageKind.EXAMPLE)
return "example"; return "example";
@ -338,7 +342,7 @@ public class ImplementationGuide extends MetadataResource {
if (code == GuidePageKind.RESOURCE) if (code == GuidePageKind.RESOURCE)
return "resource"; return "resource";
return "?"; return "?";
} }
public String toSystem(GuidePageKind code) { public String toSystem(GuidePageKind code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -149,14 +149,16 @@ public class Linkage extends DomainResource {
throw new FHIRException("Unknown LinkageType code '"+codeString+"'"); throw new FHIRException("Unknown LinkageType code '"+codeString+"'");
} }
public String toCode(LinkageType code) { public String toCode(LinkageType code) {
if (code == LinkageType.SOURCE) if (code == LinkageType.NULL)
return null;
if (code == LinkageType.SOURCE)
return "source"; return "source";
if (code == LinkageType.ALTERNATE) if (code == LinkageType.ALTERNATE)
return "alternate"; return "alternate";
if (code == LinkageType.HISTORICAL) if (code == LinkageType.HISTORICAL)
return "historical"; return "historical";
return "?"; return "?";
} }
public String toSystem(LinkageType code) { public String toSystem(LinkageType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -150,14 +150,16 @@ public class ListResource extends DomainResource {
throw new FHIRException("Unknown ListStatus code '"+codeString+"'"); throw new FHIRException("Unknown ListStatus code '"+codeString+"'");
} }
public String toCode(ListStatus code) { public String toCode(ListStatus code) {
if (code == ListStatus.CURRENT) if (code == ListStatus.NULL)
return null;
if (code == ListStatus.CURRENT)
return "current"; return "current";
if (code == ListStatus.RETIRED) if (code == ListStatus.RETIRED)
return "retired"; return "retired";
if (code == ListStatus.ENTEREDINERROR) if (code == ListStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ListStatus code) { public String toSystem(ListStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -262,14 +264,16 @@ public class ListResource extends DomainResource {
throw new FHIRException("Unknown ListMode code '"+codeString+"'"); throw new FHIRException("Unknown ListMode code '"+codeString+"'");
} }
public String toCode(ListMode code) { public String toCode(ListMode code) {
if (code == ListMode.WORKING) if (code == ListMode.NULL)
return null;
if (code == ListMode.WORKING)
return "working"; return "working";
if (code == ListMode.SNAPSHOT) if (code == ListMode.SNAPSHOT)
return "snapshot"; return "snapshot";
if (code == ListMode.CHANGES) if (code == ListMode.CHANGES)
return "changes"; return "changes";
return "?"; return "?";
} }
public String toSystem(ListMode code) { public String toSystem(ListMode code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -152,14 +152,16 @@ public class Location extends DomainResource {
throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); throw new FHIRException("Unknown LocationStatus code '"+codeString+"'");
} }
public String toCode(LocationStatus code) { public String toCode(LocationStatus code) {
if (code == LocationStatus.ACTIVE) if (code == LocationStatus.NULL)
return null;
if (code == LocationStatus.ACTIVE)
return "active"; return "active";
if (code == LocationStatus.SUSPENDED) if (code == LocationStatus.SUSPENDED)
return "suspended"; return "suspended";
if (code == LocationStatus.INACTIVE) if (code == LocationStatus.INACTIVE)
return "inactive"; return "inactive";
return "?"; return "?";
} }
public String toSystem(LocationStatus code) { public String toSystem(LocationStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -250,12 +252,14 @@ public class Location extends DomainResource {
throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); throw new FHIRException("Unknown LocationMode code '"+codeString+"'");
} }
public String toCode(LocationMode code) { public String toCode(LocationMode code) {
if (code == LocationMode.INSTANCE) if (code == LocationMode.NULL)
return null;
if (code == LocationMode.INSTANCE)
return "instance"; return "instance";
if (code == LocationMode.KIND) if (code == LocationMode.KIND)
return "kind"; return "kind";
return "?"; return "?";
} }
public String toSystem(LocationMode code) { public String toSystem(LocationMode code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -152,14 +152,16 @@ public class MeasureReport extends DomainResource {
throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'"); throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'");
} }
public String toCode(MeasureReportStatus code) { public String toCode(MeasureReportStatus code) {
if (code == MeasureReportStatus.COMPLETE) if (code == MeasureReportStatus.NULL)
return null;
if (code == MeasureReportStatus.COMPLETE)
return "complete"; return "complete";
if (code == MeasureReportStatus.PENDING) if (code == MeasureReportStatus.PENDING)
return "pending"; return "pending";
if (code == MeasureReportStatus.ERROR) if (code == MeasureReportStatus.ERROR)
return "error"; return "error";
return "?"; return "?";
} }
public String toSystem(MeasureReportStatus code) { public String toSystem(MeasureReportStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -264,14 +266,16 @@ public class MeasureReport extends DomainResource {
throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'"); throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'");
} }
public String toCode(MeasureReportType code) { public String toCode(MeasureReportType code) {
if (code == MeasureReportType.INDIVIDUAL) if (code == MeasureReportType.NULL)
return null;
if (code == MeasureReportType.INDIVIDUAL)
return "individual"; return "individual";
if (code == MeasureReportType.PATIENTLIST) if (code == MeasureReportType.PATIENTLIST)
return "patient-list"; return "patient-list";
if (code == MeasureReportType.SUMMARY) if (code == MeasureReportType.SUMMARY)
return "summary"; return "summary";
return "?"; return "?";
} }
public String toSystem(MeasureReportType code) { public String toSystem(MeasureReportType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -148,14 +148,16 @@ public class Media extends DomainResource {
throw new FHIRException("Unknown DigitalMediaType code '"+codeString+"'"); throw new FHIRException("Unknown DigitalMediaType code '"+codeString+"'");
} }
public String toCode(DigitalMediaType code) { public String toCode(DigitalMediaType code) {
if (code == DigitalMediaType.PHOTO) if (code == DigitalMediaType.NULL)
return null;
if (code == DigitalMediaType.PHOTO)
return "photo"; return "photo";
if (code == DigitalMediaType.VIDEO) if (code == DigitalMediaType.VIDEO)
return "video"; return "video";
if (code == DigitalMediaType.AUDIO) if (code == DigitalMediaType.AUDIO)
return "audio"; return "audio";
return "?"; return "?";
} }
public String toSystem(DigitalMediaType code) { public String toSystem(DigitalMediaType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -151,14 +151,16 @@ public class Medication extends DomainResource {
throw new FHIRException("Unknown MedicationStatus code '"+codeString+"'"); throw new FHIRException("Unknown MedicationStatus code '"+codeString+"'");
} }
public String toCode(MedicationStatus code) { public String toCode(MedicationStatus code) {
if (code == MedicationStatus.ACTIVE) if (code == MedicationStatus.NULL)
return null;
if (code == MedicationStatus.ACTIVE)
return "active"; return "active";
if (code == MedicationStatus.INACTIVE) if (code == MedicationStatus.INACTIVE)
return "inactive"; return "inactive";
if (code == MedicationStatus.ENTEREDINERROR) if (code == MedicationStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(MedicationStatus code) { public String toSystem(MedicationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -193,7 +193,9 @@ public class MedicationAdministration extends DomainResource {
throw new FHIRException("Unknown MedicationAdministrationStatus code '"+codeString+"'"); throw new FHIRException("Unknown MedicationAdministrationStatus code '"+codeString+"'");
} }
public String toCode(MedicationAdministrationStatus code) { public String toCode(MedicationAdministrationStatus code) {
if (code == MedicationAdministrationStatus.INPROGRESS) if (code == MedicationAdministrationStatus.NULL)
return null;
if (code == MedicationAdministrationStatus.INPROGRESS)
return "in-progress"; return "in-progress";
if (code == MedicationAdministrationStatus.ONHOLD) if (code == MedicationAdministrationStatus.ONHOLD)
return "on-hold"; return "on-hold";
@ -206,7 +208,7 @@ public class MedicationAdministration extends DomainResource {
if (code == MedicationAdministrationStatus.UNKNOWN) if (code == MedicationAdministrationStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(MedicationAdministrationStatus code) { public String toSystem(MedicationAdministrationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -193,7 +193,9 @@ public class MedicationDispense extends DomainResource {
throw new FHIRException("Unknown MedicationDispenseStatus code '"+codeString+"'"); throw new FHIRException("Unknown MedicationDispenseStatus code '"+codeString+"'");
} }
public String toCode(MedicationDispenseStatus code) { public String toCode(MedicationDispenseStatus code) {
if (code == MedicationDispenseStatus.PREPARATION) if (code == MedicationDispenseStatus.NULL)
return null;
if (code == MedicationDispenseStatus.PREPARATION)
return "preparation"; return "preparation";
if (code == MedicationDispenseStatus.INPROGRESS) if (code == MedicationDispenseStatus.INPROGRESS)
return "in-progress"; return "in-progress";
@ -206,7 +208,7 @@ public class MedicationDispense extends DomainResource {
if (code == MedicationDispenseStatus.STOPPED) if (code == MedicationDispenseStatus.STOPPED)
return "stopped"; return "stopped";
return "?"; return "?";
} }
public String toSystem(MedicationDispenseStatus code) { public String toSystem(MedicationDispenseStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -221,7 +221,9 @@ public class MedicationRequest extends DomainResource {
throw new FHIRException("Unknown MedicationRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown MedicationRequestStatus code '"+codeString+"'");
} }
public String toCode(MedicationRequestStatus code) { public String toCode(MedicationRequestStatus code) {
if (code == MedicationRequestStatus.ACTIVE) if (code == MedicationRequestStatus.NULL)
return null;
if (code == MedicationRequestStatus.ACTIVE)
return "active"; return "active";
if (code == MedicationRequestStatus.ONHOLD) if (code == MedicationRequestStatus.ONHOLD)
return "on-hold"; return "on-hold";
@ -238,7 +240,7 @@ public class MedicationRequest extends DomainResource {
if (code == MedicationRequestStatus.UNKNOWN) if (code == MedicationRequestStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(MedicationRequestStatus code) { public String toSystem(MedicationRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -357,7 +359,9 @@ public class MedicationRequest extends DomainResource {
throw new FHIRException("Unknown MedicationRequestIntent code '"+codeString+"'"); throw new FHIRException("Unknown MedicationRequestIntent code '"+codeString+"'");
} }
public String toCode(MedicationRequestIntent code) { public String toCode(MedicationRequestIntent code) {
if (code == MedicationRequestIntent.PROPOSAL) if (code == MedicationRequestIntent.NULL)
return null;
if (code == MedicationRequestIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == MedicationRequestIntent.PLAN) if (code == MedicationRequestIntent.PLAN)
return "plan"; return "plan";
@ -366,7 +370,7 @@ public class MedicationRequest extends DomainResource {
if (code == MedicationRequestIntent.INSTANCEORDER) if (code == MedicationRequestIntent.INSTANCEORDER)
return "instance-order"; return "instance-order";
return "?"; return "?";
} }
public String toSystem(MedicationRequestIntent code) { public String toSystem(MedicationRequestIntent code) {
return code.getSystem(); return code.getSystem();
} }
@ -485,7 +489,9 @@ public class MedicationRequest extends DomainResource {
throw new FHIRException("Unknown MedicationRequestPriority code '"+codeString+"'"); throw new FHIRException("Unknown MedicationRequestPriority code '"+codeString+"'");
} }
public String toCode(MedicationRequestPriority code) { public String toCode(MedicationRequestPriority code) {
if (code == MedicationRequestPriority.ROUTINE) if (code == MedicationRequestPriority.NULL)
return null;
if (code == MedicationRequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == MedicationRequestPriority.URGENT) if (code == MedicationRequestPriority.URGENT)
return "urgent"; return "urgent";
@ -494,7 +500,7 @@ public class MedicationRequest extends DomainResource {
if (code == MedicationRequestPriority.ASAP) if (code == MedicationRequestPriority.ASAP)
return "asap"; return "asap";
return "?"; return "?";
} }
public String toSystem(MedicationRequestPriority code) { public String toSystem(MedicationRequestPriority code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -192,7 +192,9 @@ public class MedicationStatement extends DomainResource {
throw new FHIRException("Unknown MedicationStatementStatus code '"+codeString+"'"); throw new FHIRException("Unknown MedicationStatementStatus code '"+codeString+"'");
} }
public String toCode(MedicationStatementStatus code) { public String toCode(MedicationStatementStatus code) {
if (code == MedicationStatementStatus.ACTIVE) if (code == MedicationStatementStatus.NULL)
return null;
if (code == MedicationStatementStatus.ACTIVE)
return "active"; return "active";
if (code == MedicationStatementStatus.COMPLETED) if (code == MedicationStatementStatus.COMPLETED)
return "completed"; return "completed";
@ -205,7 +207,7 @@ public class MedicationStatement extends DomainResource {
if (code == MedicationStatementStatus.ONHOLD) if (code == MedicationStatementStatus.ONHOLD)
return "on-hold"; return "on-hold";
return "?"; return "?";
} }
public String toSystem(MedicationStatementStatus code) { public String toSystem(MedicationStatementStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -324,7 +326,9 @@ public class MedicationStatement extends DomainResource {
throw new FHIRException("Unknown MedicationStatementTaken code '"+codeString+"'"); throw new FHIRException("Unknown MedicationStatementTaken code '"+codeString+"'");
} }
public String toCode(MedicationStatementTaken code) { public String toCode(MedicationStatementTaken code) {
if (code == MedicationStatementTaken.Y) if (code == MedicationStatementTaken.NULL)
return null;
if (code == MedicationStatementTaken.Y)
return "y"; return "y";
if (code == MedicationStatementTaken.N) if (code == MedicationStatementTaken.N)
return "n"; return "n";
@ -333,7 +337,7 @@ public class MedicationStatement extends DomainResource {
if (code == MedicationStatementTaken.NA) if (code == MedicationStatementTaken.NA)
return "na"; return "na";
return "?"; return "?";
} }
public String toSystem(MedicationStatementTaken code) { public String toSystem(MedicationStatementTaken code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -154,14 +154,16 @@ public class MessageDefinition extends MetadataResource {
throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'");
} }
public String toCode(MessageSignificanceCategory code) { public String toCode(MessageSignificanceCategory code) {
if (code == MessageSignificanceCategory.CONSEQUENCE) if (code == MessageSignificanceCategory.NULL)
return null;
if (code == MessageSignificanceCategory.CONSEQUENCE)
return "Consequence"; return "Consequence";
if (code == MessageSignificanceCategory.CURRENCY) if (code == MessageSignificanceCategory.CURRENCY)
return "Currency"; return "Currency";
if (code == MessageSignificanceCategory.NOTIFICATION) if (code == MessageSignificanceCategory.NOTIFICATION)
return "Notification"; return "Notification";
return "?"; return "?";
} }
public String toSystem(MessageSignificanceCategory code) { public String toSystem(MessageSignificanceCategory code) {
return code.getSystem(); return code.getSystem();
} }

View File

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

View File

@ -154,14 +154,16 @@ public class NamingSystem extends MetadataResource {
throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'"); throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'");
} }
public String toCode(NamingSystemType code) { public String toCode(NamingSystemType code) {
if (code == NamingSystemType.CODESYSTEM) if (code == NamingSystemType.NULL)
return null;
if (code == NamingSystemType.CODESYSTEM)
return "codesystem"; return "codesystem";
if (code == NamingSystemType.IDENTIFIER) if (code == NamingSystemType.IDENTIFIER)
return "identifier"; return "identifier";
if (code == NamingSystemType.ROOT) if (code == NamingSystemType.ROOT)
return "root"; return "root";
return "?"; return "?";
} }
public String toSystem(NamingSystemType code) { public String toSystem(NamingSystemType code) {
return code.getSystem(); return code.getSystem();
} }
@ -280,7 +282,9 @@ public class NamingSystem extends MetadataResource {
throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'");
} }
public String toCode(NamingSystemIdentifierType code) { public String toCode(NamingSystemIdentifierType code) {
if (code == NamingSystemIdentifierType.OID) if (code == NamingSystemIdentifierType.NULL)
return null;
if (code == NamingSystemIdentifierType.OID)
return "oid"; return "oid";
if (code == NamingSystemIdentifierType.UUID) if (code == NamingSystemIdentifierType.UUID)
return "uuid"; return "uuid";
@ -289,7 +293,7 @@ public class NamingSystem extends MetadataResource {
if (code == NamingSystemIdentifierType.OTHER) if (code == NamingSystemIdentifierType.OTHER)
return "other"; return "other";
return "?"; return "?";
} }
public String toSystem(NamingSystemIdentifierType code) { public String toSystem(NamingSystemIdentifierType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -160,7 +160,9 @@ public class Narrative extends BaseNarrative implements INarrative {
throw new FHIRException("Unknown NarrativeStatus code '"+codeString+"'"); throw new FHIRException("Unknown NarrativeStatus code '"+codeString+"'");
} }
public String toCode(NarrativeStatus code) { public String toCode(NarrativeStatus code) {
if (code == NarrativeStatus.GENERATED) if (code == NarrativeStatus.NULL)
return null;
if (code == NarrativeStatus.GENERATED)
return "generated"; return "generated";
if (code == NarrativeStatus.EXTENSIONS) if (code == NarrativeStatus.EXTENSIONS)
return "extensions"; return "extensions";
@ -169,7 +171,7 @@ public class Narrative extends BaseNarrative implements INarrative {
if (code == NarrativeStatus.EMPTY) if (code == NarrativeStatus.EMPTY)
return "empty"; return "empty";
return "?"; return "?";
} }
public String toSystem(NarrativeStatus code) { public String toSystem(NarrativeStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -235,7 +235,9 @@ public class NutritionOrder extends DomainResource {
throw new FHIRException("Unknown NutritionOrderStatus code '"+codeString+"'"); throw new FHIRException("Unknown NutritionOrderStatus code '"+codeString+"'");
} }
public String toCode(NutritionOrderStatus code) { public String toCode(NutritionOrderStatus code) {
if (code == NutritionOrderStatus.PROPOSED) if (code == NutritionOrderStatus.NULL)
return null;
if (code == NutritionOrderStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == NutritionOrderStatus.DRAFT) if (code == NutritionOrderStatus.DRAFT)
return "draft"; return "draft";
@ -254,7 +256,7 @@ public class NutritionOrder extends DomainResource {
if (code == NutritionOrderStatus.ENTEREDINERROR) if (code == NutritionOrderStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(NutritionOrderStatus code) { public String toSystem(NutritionOrderStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -222,7 +222,9 @@ public class Observation extends DomainResource {
throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'"); throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'");
} }
public String toCode(ObservationStatus code) { public String toCode(ObservationStatus code) {
if (code == ObservationStatus.REGISTERED) if (code == ObservationStatus.NULL)
return null;
if (code == ObservationStatus.REGISTERED)
return "registered"; return "registered";
if (code == ObservationStatus.PRELIMINARY) if (code == ObservationStatus.PRELIMINARY)
return "preliminary"; return "preliminary";
@ -239,7 +241,7 @@ public class Observation extends DomainResource {
if (code == ObservationStatus.UNKNOWN) if (code == ObservationStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(ObservationStatus code) { public String toSystem(ObservationStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -386,7 +388,9 @@ public class Observation extends DomainResource {
throw new FHIRException("Unknown ObservationRelationshipType code '"+codeString+"'"); throw new FHIRException("Unknown ObservationRelationshipType code '"+codeString+"'");
} }
public String toCode(ObservationRelationshipType code) { public String toCode(ObservationRelationshipType code) {
if (code == ObservationRelationshipType.HASMEMBER) if (code == ObservationRelationshipType.NULL)
return null;
if (code == ObservationRelationshipType.HASMEMBER)
return "has-member"; return "has-member";
if (code == ObservationRelationshipType.DERIVEDFROM) if (code == ObservationRelationshipType.DERIVEDFROM)
return "derived-from"; return "derived-from";
@ -399,7 +403,7 @@ public class Observation extends DomainResource {
if (code == ObservationRelationshipType.INTERFEREDBY) if (code == ObservationRelationshipType.INTERFEREDBY)
return "interfered-by"; return "interfered-by";
return "?"; return "?";
} }
public String toSystem(ObservationRelationshipType code) { public String toSystem(ObservationRelationshipType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -145,12 +145,14 @@ public class OperationDefinition extends MetadataResource {
throw new FHIRException("Unknown OperationKind code '"+codeString+"'"); throw new FHIRException("Unknown OperationKind code '"+codeString+"'");
} }
public String toCode(OperationKind code) { public String toCode(OperationKind code) {
if (code == OperationKind.OPERATION) if (code == OperationKind.NULL)
return null;
if (code == OperationKind.OPERATION)
return "operation"; return "operation";
if (code == OperationKind.QUERY) if (code == OperationKind.QUERY)
return "query"; return "query";
return "?"; return "?";
} }
public String toSystem(OperationKind code) { public String toSystem(OperationKind code) {
return code.getSystem(); return code.getSystem();
} }
@ -241,12 +243,14 @@ public class OperationDefinition extends MetadataResource {
throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'"); throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
} }
public String toCode(OperationParameterUse code) { public String toCode(OperationParameterUse code) {
if (code == OperationParameterUse.IN) if (code == OperationParameterUse.NULL)
return null;
if (code == OperationParameterUse.IN)
return "in"; return "in";
if (code == OperationParameterUse.OUT) if (code == OperationParameterUse.OUT)
return "out"; return "out";
return "?"; return "?";
} }
public String toSystem(OperationParameterUse code) { public String toSystem(OperationParameterUse code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -164,7 +164,9 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'"); throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'");
} }
public String toCode(IssueSeverity code) { public String toCode(IssueSeverity code) {
if (code == IssueSeverity.FATAL) if (code == IssueSeverity.NULL)
return null;
if (code == IssueSeverity.FATAL)
return "fatal"; return "fatal";
if (code == IssueSeverity.ERROR) if (code == IssueSeverity.ERROR)
return "error"; return "error";
@ -173,7 +175,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
if (code == IssueSeverity.INFORMATION) if (code == IssueSeverity.INFORMATION)
return "information"; return "information";
return "?"; return "?";
} }
public String toSystem(IssueSeverity code) { public String toSystem(IssueSeverity code) {
return code.getSystem(); return code.getSystem();
} }
@ -642,7 +644,9 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
throw new FHIRException("Unknown IssueType code '"+codeString+"'"); throw new FHIRException("Unknown IssueType code '"+codeString+"'");
} }
public String toCode(IssueType code) { public String toCode(IssueType code) {
if (code == IssueType.INVALID) if (code == IssueType.NULL)
return null;
if (code == IssueType.INVALID)
return "invalid"; return "invalid";
if (code == IssueType.STRUCTURE) if (code == IssueType.STRUCTURE)
return "structure"; return "structure";
@ -701,7 +705,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
if (code == IssueType.INFORMATIONAL) if (code == IssueType.INFORMATIONAL)
return "informational"; return "informational";
return "?"; return "?";
} }
public String toSystem(IssueType code) { public String toSystem(IssueType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -132,12 +132,14 @@ public class ParameterDefinition extends Type implements ICompositeType {
throw new FHIRException("Unknown ParameterUse code '"+codeString+"'"); throw new FHIRException("Unknown ParameterUse code '"+codeString+"'");
} }
public String toCode(ParameterUse code) { public String toCode(ParameterUse code) {
if (code == ParameterUse.IN) if (code == ParameterUse.NULL)
return null;
if (code == ParameterUse.IN)
return "in"; return "in";
if (code == ParameterUse.OUT) if (code == ParameterUse.OUT)
return "out"; return "out";
return "?"; return "?";
} }
public String toSystem(ParameterUse code) { public String toSystem(ParameterUse code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -166,7 +166,9 @@ public class Patient extends DomainResource {
throw new FHIRException("Unknown LinkType code '"+codeString+"'"); throw new FHIRException("Unknown LinkType code '"+codeString+"'");
} }
public String toCode(LinkType code) { public String toCode(LinkType code) {
if (code == LinkType.REPLACEDBY) if (code == LinkType.NULL)
return null;
if (code == LinkType.REPLACEDBY)
return "replaced-by"; return "replaced-by";
if (code == LinkType.REPLACES) if (code == LinkType.REPLACES)
return "replaces"; return "replaces";
@ -175,7 +177,7 @@ public class Patient extends DomainResource {
if (code == LinkType.SEEALSO) if (code == LinkType.SEEALSO)
return "seealso"; return "seealso";
return "?"; return "?";
} }
public String toSystem(LinkType code) { public String toSystem(LinkType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -161,7 +161,9 @@ public class PaymentNotice extends DomainResource {
throw new FHIRException("Unknown PaymentNoticeStatus code '"+codeString+"'"); throw new FHIRException("Unknown PaymentNoticeStatus code '"+codeString+"'");
} }
public String toCode(PaymentNoticeStatus code) { public String toCode(PaymentNoticeStatus code) {
if (code == PaymentNoticeStatus.ACTIVE) if (code == PaymentNoticeStatus.NULL)
return null;
if (code == PaymentNoticeStatus.ACTIVE)
return "active"; return "active";
if (code == PaymentNoticeStatus.CANCELLED) if (code == PaymentNoticeStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -170,7 +172,7 @@ public class PaymentNotice extends DomainResource {
if (code == PaymentNoticeStatus.ENTEREDINERROR) if (code == PaymentNoticeStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(PaymentNoticeStatus code) { public String toSystem(PaymentNoticeStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -164,7 +164,9 @@ public class PaymentReconciliation extends DomainResource {
throw new FHIRException("Unknown PaymentReconciliationStatus code '"+codeString+"'"); throw new FHIRException("Unknown PaymentReconciliationStatus code '"+codeString+"'");
} }
public String toCode(PaymentReconciliationStatus code) { public String toCode(PaymentReconciliationStatus code) {
if (code == PaymentReconciliationStatus.ACTIVE) if (code == PaymentReconciliationStatus.NULL)
return null;
if (code == PaymentReconciliationStatus.ACTIVE)
return "active"; return "active";
if (code == PaymentReconciliationStatus.CANCELLED) if (code == PaymentReconciliationStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -173,7 +175,7 @@ public class PaymentReconciliation extends DomainResource {
if (code == PaymentReconciliationStatus.ENTEREDINERROR) if (code == PaymentReconciliationStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(PaymentReconciliationStatus code) { public String toSystem(PaymentReconciliationStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -165,7 +165,9 @@ public class Person extends DomainResource {
throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'"); throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'");
} }
public String toCode(IdentityAssuranceLevel code) { public String toCode(IdentityAssuranceLevel code) {
if (code == IdentityAssuranceLevel.LEVEL1) if (code == IdentityAssuranceLevel.NULL)
return null;
if (code == IdentityAssuranceLevel.LEVEL1)
return "level1"; return "level1";
if (code == IdentityAssuranceLevel.LEVEL2) if (code == IdentityAssuranceLevel.LEVEL2)
return "level2"; return "level2";
@ -174,7 +176,7 @@ public class Person extends DomainResource {
if (code == IdentityAssuranceLevel.LEVEL4) if (code == IdentityAssuranceLevel.LEVEL4)
return "level4"; return "level4";
return "?"; return "?";
} }
public String toSystem(IdentityAssuranceLevel code) { public String toSystem(IdentityAssuranceLevel code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -155,14 +155,16 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
} }
public String toCode(ActionConditionKind code) { public String toCode(ActionConditionKind code) {
if (code == ActionConditionKind.APPLICABILITY) if (code == ActionConditionKind.NULL)
return null;
if (code == ActionConditionKind.APPLICABILITY)
return "applicability"; return "applicability";
if (code == ActionConditionKind.START) if (code == ActionConditionKind.START)
return "start"; return "start";
if (code == ActionConditionKind.STOP) if (code == ActionConditionKind.STOP)
return "stop"; return "stop";
return "?"; return "?";
} }
public String toSystem(ActionConditionKind code) { public String toSystem(ActionConditionKind code) {
return code.getSystem(); return code.getSystem();
} }
@ -351,7 +353,9 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
} }
public String toCode(ActionRelationshipType code) { public String toCode(ActionRelationshipType code) {
if (code == ActionRelationshipType.BEFORESTART) if (code == ActionRelationshipType.NULL)
return null;
if (code == ActionRelationshipType.BEFORESTART)
return "before-start"; return "before-start";
if (code == ActionRelationshipType.BEFORE) if (code == ActionRelationshipType.BEFORE)
return "before"; return "before";
@ -370,7 +374,7 @@ public class PlanDefinition extends MetadataResource {
if (code == ActionRelationshipType.AFTEREND) if (code == ActionRelationshipType.AFTEREND)
return "after-end"; return "after-end";
return "?"; return "?";
} }
public String toSystem(ActionRelationshipType code) { public String toSystem(ActionRelationshipType code) {
return code.getSystem(); return code.getSystem();
} }
@ -475,14 +479,16 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'"); throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
} }
public String toCode(ActionParticipantType code) { public String toCode(ActionParticipantType code) {
if (code == ActionParticipantType.PATIENT) if (code == ActionParticipantType.NULL)
return null;
if (code == ActionParticipantType.PATIENT)
return "patient"; return "patient";
if (code == ActionParticipantType.PRACTITIONER) if (code == ActionParticipantType.PRACTITIONER)
return "practitioner"; return "practitioner";
if (code == ActionParticipantType.RELATEDPERSON) if (code == ActionParticipantType.RELATEDPERSON)
return "related-person"; return "related-person";
return "?"; return "?";
} }
public String toSystem(ActionParticipantType code) { public String toSystem(ActionParticipantType code) {
return code.getSystem(); return code.getSystem();
} }
@ -587,14 +593,16 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
} }
public String toCode(ActionGroupingBehavior code) { public String toCode(ActionGroupingBehavior code) {
if (code == ActionGroupingBehavior.VISUALGROUP) if (code == ActionGroupingBehavior.NULL)
return null;
if (code == ActionGroupingBehavior.VISUALGROUP)
return "visual-group"; return "visual-group";
if (code == ActionGroupingBehavior.LOGICALGROUP) if (code == ActionGroupingBehavior.LOGICALGROUP)
return "logical-group"; return "logical-group";
if (code == ActionGroupingBehavior.SENTENCEGROUP) if (code == ActionGroupingBehavior.SENTENCEGROUP)
return "sentence-group"; return "sentence-group";
return "?"; return "?";
} }
public String toSystem(ActionGroupingBehavior code) { public String toSystem(ActionGroupingBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -741,7 +749,9 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
} }
public String toCode(ActionSelectionBehavior code) { public String toCode(ActionSelectionBehavior code) {
if (code == ActionSelectionBehavior.ANY) if (code == ActionSelectionBehavior.NULL)
return null;
if (code == ActionSelectionBehavior.ANY)
return "any"; return "any";
if (code == ActionSelectionBehavior.ALL) if (code == ActionSelectionBehavior.ALL)
return "all"; return "all";
@ -754,7 +764,7 @@ public class PlanDefinition extends MetadataResource {
if (code == ActionSelectionBehavior.ONEORMORE) if (code == ActionSelectionBehavior.ONEORMORE)
return "one-or-more"; return "one-or-more";
return "?"; return "?";
} }
public String toSystem(ActionSelectionBehavior code) { public String toSystem(ActionSelectionBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -859,14 +869,16 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
} }
public String toCode(ActionRequiredBehavior code) { public String toCode(ActionRequiredBehavior code) {
if (code == ActionRequiredBehavior.MUST) if (code == ActionRequiredBehavior.NULL)
return null;
if (code == ActionRequiredBehavior.MUST)
return "must"; return "must";
if (code == ActionRequiredBehavior.COULD) if (code == ActionRequiredBehavior.COULD)
return "could"; return "could";
if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED) if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED)
return "must-unless-documented"; return "must-unless-documented";
return "?"; return "?";
} }
public String toSystem(ActionRequiredBehavior code) { public String toSystem(ActionRequiredBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -957,12 +969,14 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
} }
public String toCode(ActionPrecheckBehavior code) { public String toCode(ActionPrecheckBehavior code) {
if (code == ActionPrecheckBehavior.YES) if (code == ActionPrecheckBehavior.NULL)
return null;
if (code == ActionPrecheckBehavior.YES)
return "yes"; return "yes";
if (code == ActionPrecheckBehavior.NO) if (code == ActionPrecheckBehavior.NO)
return "no"; return "no";
return "?"; return "?";
} }
public String toSystem(ActionPrecheckBehavior code) { public String toSystem(ActionPrecheckBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -1053,12 +1067,14 @@ public class PlanDefinition extends MetadataResource {
throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
} }
public String toCode(ActionCardinalityBehavior code) { public String toCode(ActionCardinalityBehavior code) {
if (code == ActionCardinalityBehavior.SINGLE) if (code == ActionCardinalityBehavior.NULL)
return null;
if (code == ActionCardinalityBehavior.SINGLE)
return "single"; return "single";
if (code == ActionCardinalityBehavior.MULTIPLE) if (code == ActionCardinalityBehavior.MULTIPLE)
return "multiple"; return "multiple";
return "?"; return "?";
} }
public String toSystem(ActionCardinalityBehavior code) { public String toSystem(ActionCardinalityBehavior code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -206,7 +206,9 @@ public class PractitionerRole extends DomainResource {
throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
} }
public String toCode(DaysOfWeek code) { public String toCode(DaysOfWeek code) {
if (code == DaysOfWeek.MON) if (code == DaysOfWeek.NULL)
return null;
if (code == DaysOfWeek.MON)
return "mon"; return "mon";
if (code == DaysOfWeek.TUE) if (code == DaysOfWeek.TUE)
return "tue"; return "tue";
@ -221,7 +223,7 @@ public class PractitionerRole extends DomainResource {
if (code == DaysOfWeek.SUN) if (code == DaysOfWeek.SUN)
return "sun"; return "sun";
return "?"; return "?";
} }
public String toSystem(DaysOfWeek code) { public String toSystem(DaysOfWeek code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -205,7 +205,9 @@ public class Procedure extends DomainResource {
throw new FHIRException("Unknown ProcedureStatus code '"+codeString+"'"); throw new FHIRException("Unknown ProcedureStatus code '"+codeString+"'");
} }
public String toCode(ProcedureStatus code) { public String toCode(ProcedureStatus code) {
if (code == ProcedureStatus.PREPARATION) if (code == ProcedureStatus.NULL)
return null;
if (code == ProcedureStatus.PREPARATION)
return "preparation"; return "preparation";
if (code == ProcedureStatus.INPROGRESS) if (code == ProcedureStatus.INPROGRESS)
return "in-progress"; return "in-progress";
@ -220,7 +222,7 @@ public class Procedure extends DomainResource {
if (code == ProcedureStatus.UNKNOWN) if (code == ProcedureStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(ProcedureStatus code) { public String toSystem(ProcedureStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -206,7 +206,9 @@ public class ProcedureRequest extends DomainResource {
throw new FHIRException("Unknown ProcedureRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown ProcedureRequestStatus code '"+codeString+"'");
} }
public String toCode(ProcedureRequestStatus code) { public String toCode(ProcedureRequestStatus code) {
if (code == ProcedureRequestStatus.DRAFT) if (code == ProcedureRequestStatus.NULL)
return null;
if (code == ProcedureRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == ProcedureRequestStatus.ACTIVE) if (code == ProcedureRequestStatus.ACTIVE)
return "active"; return "active";
@ -221,7 +223,7 @@ public class ProcedureRequest extends DomainResource {
if (code == ProcedureRequestStatus.UNKNOWN) if (code == ProcedureRequestStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(ProcedureRequestStatus code) { public String toSystem(ProcedureRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -398,7 +400,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ProcedureRequestIntent code '"+codeString+"'"); throw new FHIRException("Unknown ProcedureRequestIntent code '"+codeString+"'");
} }
public String toCode(ProcedureRequestIntent code) { public String toCode(ProcedureRequestIntent code) {
if (code == ProcedureRequestIntent.PROPOSAL) if (code == ProcedureRequestIntent.NULL)
return null;
if (code == ProcedureRequestIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == ProcedureRequestIntent.PLAN) if (code == ProcedureRequestIntent.PLAN)
return "plan"; return "plan";
@ -415,7 +419,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == ProcedureRequestIntent.OPTION) if (code == ProcedureRequestIntent.OPTION)
return "option"; return "option";
return "?"; return "?";
} }
public String toSystem(ProcedureRequestIntent code) { public String toSystem(ProcedureRequestIntent code) {
return code.getSystem(); return code.getSystem();
} }
@ -534,7 +538,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ProcedureRequestPriority code '"+codeString+"'"); throw new FHIRException("Unknown ProcedureRequestPriority code '"+codeString+"'");
} }
public String toCode(ProcedureRequestPriority code) { public String toCode(ProcedureRequestPriority code) {
if (code == ProcedureRequestPriority.ROUTINE) if (code == ProcedureRequestPriority.NULL)
return null;
if (code == ProcedureRequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == ProcedureRequestPriority.URGENT) if (code == ProcedureRequestPriority.URGENT)
return "urgent"; return "urgent";
@ -543,7 +549,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == ProcedureRequestPriority.STAT) if (code == ProcedureRequestPriority.STAT)
return "stat"; return "stat";
return "?"; return "?";
} }
public String toSystem(ProcedureRequestPriority code) { public String toSystem(ProcedureRequestPriority code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -165,7 +165,9 @@ public class ProcessRequest extends DomainResource {
throw new FHIRException("Unknown ProcessRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown ProcessRequestStatus code '"+codeString+"'");
} }
public String toCode(ProcessRequestStatus code) { public String toCode(ProcessRequestStatus code) {
if (code == ProcessRequestStatus.ACTIVE) if (code == ProcessRequestStatus.NULL)
return null;
if (code == ProcessRequestStatus.ACTIVE)
return "active"; return "active";
if (code == ProcessRequestStatus.CANCELLED) if (code == ProcessRequestStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -174,7 +176,7 @@ public class ProcessRequest extends DomainResource {
if (code == ProcessRequestStatus.ENTEREDINERROR) if (code == ProcessRequestStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ProcessRequestStatus code) { public String toSystem(ProcessRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -293,7 +295,9 @@ public class ProcessRequest extends DomainResource {
throw new FHIRException("Unknown ActionList code '"+codeString+"'"); throw new FHIRException("Unknown ActionList code '"+codeString+"'");
} }
public String toCode(ActionList code) { public String toCode(ActionList code) {
if (code == ActionList.CANCEL) if (code == ActionList.NULL)
return null;
if (code == ActionList.CANCEL)
return "cancel"; return "cancel";
if (code == ActionList.POLL) if (code == ActionList.POLL)
return "poll"; return "poll";
@ -302,7 +306,7 @@ public class ProcessRequest extends DomainResource {
if (code == ActionList.STATUS) if (code == ActionList.STATUS)
return "status"; return "status";
return "?"; return "?";
} }
public String toSystem(ActionList code) { public String toSystem(ActionList code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -164,7 +164,9 @@ public class ProcessResponse extends DomainResource {
throw new FHIRException("Unknown ProcessResponseStatus code '"+codeString+"'"); throw new FHIRException("Unknown ProcessResponseStatus code '"+codeString+"'");
} }
public String toCode(ProcessResponseStatus code) { public String toCode(ProcessResponseStatus code) {
if (code == ProcessResponseStatus.ACTIVE) if (code == ProcessResponseStatus.NULL)
return null;
if (code == ProcessResponseStatus.ACTIVE)
return "active"; return "active";
if (code == ProcessResponseStatus.CANCELLED) if (code == ProcessResponseStatus.CANCELLED)
return "cancelled"; return "cancelled";
@ -173,7 +175,7 @@ public class ProcessResponse extends DomainResource {
if (code == ProcessResponseStatus.ENTEREDINERROR) if (code == ProcessResponseStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ProcessResponseStatus code) { public String toSystem(ProcessResponseStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -179,7 +179,9 @@ public class Provenance extends DomainResource {
throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'");
} }
public String toCode(ProvenanceEntityRole code) { public String toCode(ProvenanceEntityRole code) {
if (code == ProvenanceEntityRole.DERIVATION) if (code == ProvenanceEntityRole.NULL)
return null;
if (code == ProvenanceEntityRole.DERIVATION)
return "derivation"; return "derivation";
if (code == ProvenanceEntityRole.REVISION) if (code == ProvenanceEntityRole.REVISION)
return "revision"; return "revision";
@ -190,7 +192,7 @@ public class Provenance extends DomainResource {
if (code == ProvenanceEntityRole.REMOVAL) if (code == ProvenanceEntityRole.REMOVAL)
return "removal"; return "removal";
return "?"; return "?";
} }
public String toSystem(ProvenanceEntityRole code) { public String toSystem(ProvenanceEntityRole code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -160,7 +160,9 @@ public class Quantity extends Type implements ICompositeType {
throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'"); throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'");
} }
public String toCode(QuantityComparator code) { public String toCode(QuantityComparator code) {
if (code == QuantityComparator.LESS_THAN) if (code == QuantityComparator.NULL)
return null;
if (code == QuantityComparator.LESS_THAN)
return "<"; return "<";
if (code == QuantityComparator.LESS_OR_EQUAL) if (code == QuantityComparator.LESS_OR_EQUAL)
return "<="; return "<=";
@ -169,7 +171,7 @@ public class Quantity extends Type implements ICompositeType {
if (code == QuantityComparator.GREATER_THAN) if (code == QuantityComparator.GREATER_THAN)
return ">"; return ">";
return "?"; return "?";
} }
public String toSystem(QuantityComparator code) { public String toSystem(QuantityComparator code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -354,7 +354,9 @@ There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-uni
throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'");
} }
public String toCode(QuestionnaireItemType code) { public String toCode(QuestionnaireItemType code) {
if (code == QuestionnaireItemType.GROUP) if (code == QuestionnaireItemType.NULL)
return null;
if (code == QuestionnaireItemType.GROUP)
return "group"; return "group";
if (code == QuestionnaireItemType.DISPLAY) if (code == QuestionnaireItemType.DISPLAY)
return "display"; return "display";
@ -389,7 +391,7 @@ There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-uni
if (code == QuestionnaireItemType.QUANTITY) if (code == QuestionnaireItemType.QUANTITY)
return "quantity"; return "quantity";
return "?"; return "?";
} }
public String toSystem(QuestionnaireItemType code) { public String toSystem(QuestionnaireItemType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -180,7 +180,9 @@ public class QuestionnaireResponse extends DomainResource {
throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'");
} }
public String toCode(QuestionnaireResponseStatus code) { public String toCode(QuestionnaireResponseStatus code) {
if (code == QuestionnaireResponseStatus.INPROGRESS) if (code == QuestionnaireResponseStatus.NULL)
return null;
if (code == QuestionnaireResponseStatus.INPROGRESS)
return "in-progress"; return "in-progress";
if (code == QuestionnaireResponseStatus.COMPLETED) if (code == QuestionnaireResponseStatus.COMPLETED)
return "completed"; return "completed";
@ -191,7 +193,7 @@ public class QuestionnaireResponse extends DomainResource {
if (code == QuestionnaireResponseStatus.STOPPED) if (code == QuestionnaireResponseStatus.STOPPED)
return "stopped"; return "stopped";
return "?"; return "?";
} }
public String toSystem(QuestionnaireResponseStatus code) { public String toSystem(QuestionnaireResponseStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -208,7 +208,9 @@ public class ReferralRequest extends DomainResource {
throw new FHIRException("Unknown ReferralRequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown ReferralRequestStatus code '"+codeString+"'");
} }
public String toCode(ReferralRequestStatus code) { public String toCode(ReferralRequestStatus code) {
if (code == ReferralRequestStatus.DRAFT) if (code == ReferralRequestStatus.NULL)
return null;
if (code == ReferralRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == ReferralRequestStatus.ACTIVE) if (code == ReferralRequestStatus.ACTIVE)
return "active"; return "active";
@ -223,7 +225,7 @@ public class ReferralRequest extends DomainResource {
if (code == ReferralRequestStatus.UNKNOWN) if (code == ReferralRequestStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(ReferralRequestStatus code) { public String toSystem(ReferralRequestStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -400,7 +402,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ReferralCategory code '"+codeString+"'"); throw new FHIRException("Unknown ReferralCategory code '"+codeString+"'");
} }
public String toCode(ReferralCategory code) { public String toCode(ReferralCategory code) {
if (code == ReferralCategory.PROPOSAL) if (code == ReferralCategory.NULL)
return null;
if (code == ReferralCategory.PROPOSAL)
return "proposal"; return "proposal";
if (code == ReferralCategory.PLAN) if (code == ReferralCategory.PLAN)
return "plan"; return "plan";
@ -417,7 +421,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == ReferralCategory.OPTION) if (code == ReferralCategory.OPTION)
return "option"; return "option";
return "?"; return "?";
} }
public String toSystem(ReferralCategory code) { public String toSystem(ReferralCategory code) {
return code.getSystem(); return code.getSystem();
} }
@ -536,7 +540,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ReferralPriority code '"+codeString+"'"); throw new FHIRException("Unknown ReferralPriority code '"+codeString+"'");
} }
public String toCode(ReferralPriority code) { public String toCode(ReferralPriority code) {
if (code == ReferralPriority.ROUTINE) if (code == ReferralPriority.NULL)
return null;
if (code == ReferralPriority.ROUTINE)
return "routine"; return "routine";
if (code == ReferralPriority.URGENT) if (code == ReferralPriority.URGENT)
return "urgent"; return "urgent";
@ -545,7 +551,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == ReferralPriority.STAT) if (code == ReferralPriority.STAT)
return "stat"; return "stat";
return "?"; return "?";
} }
public String toSystem(ReferralPriority code) { public String toSystem(ReferralPriority code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -216,7 +216,9 @@ public class RelatedArtifact extends Type implements ICompositeType {
throw new FHIRException("Unknown RelatedArtifactType code '"+codeString+"'"); throw new FHIRException("Unknown RelatedArtifactType code '"+codeString+"'");
} }
public String toCode(RelatedArtifactType code) { public String toCode(RelatedArtifactType code) {
if (code == RelatedArtifactType.DOCUMENTATION) if (code == RelatedArtifactType.NULL)
return null;
if (code == RelatedArtifactType.DOCUMENTATION)
return "documentation"; return "documentation";
if (code == RelatedArtifactType.JUSTIFICATION) if (code == RelatedArtifactType.JUSTIFICATION)
return "justification"; return "justification";
@ -233,7 +235,7 @@ public class RelatedArtifact extends Type implements ICompositeType {
if (code == RelatedArtifactType.COMPOSEDOF) if (code == RelatedArtifactType.COMPOSEDOF)
return "composed-of"; return "composed-of";
return "?"; return "?";
} }
public String toSystem(RelatedArtifactType code) { public String toSystem(RelatedArtifactType code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -208,7 +208,9 @@ public class RequestGroup extends DomainResource {
throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); throw new FHIRException("Unknown RequestStatus code '"+codeString+"'");
} }
public String toCode(RequestStatus code) { public String toCode(RequestStatus code) {
if (code == RequestStatus.DRAFT) if (code == RequestStatus.NULL)
return null;
if (code == RequestStatus.DRAFT)
return "draft"; return "draft";
if (code == RequestStatus.ACTIVE) if (code == RequestStatus.ACTIVE)
return "active"; return "active";
@ -223,7 +225,7 @@ public class RequestGroup extends DomainResource {
if (code == RequestStatus.UNKNOWN) if (code == RequestStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(RequestStatus code) { public String toSystem(RequestStatus code) {
return code.getSystem(); return code.getSystem();
} }
@ -400,7 +402,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); throw new FHIRException("Unknown RequestIntent code '"+codeString+"'");
} }
public String toCode(RequestIntent code) { public String toCode(RequestIntent code) {
if (code == RequestIntent.PROPOSAL) if (code == RequestIntent.NULL)
return null;
if (code == RequestIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == RequestIntent.PLAN) if (code == RequestIntent.PLAN)
return "plan"; return "plan";
@ -417,7 +421,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == RequestIntent.OPTION) if (code == RequestIntent.OPTION)
return "option"; return "option";
return "?"; return "?";
} }
public String toSystem(RequestIntent code) { public String toSystem(RequestIntent code) {
return code.getSystem(); return code.getSystem();
} }
@ -536,7 +540,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
} }
public String toCode(RequestPriority code) { public String toCode(RequestPriority code) {
if (code == RequestPriority.ROUTINE) if (code == RequestPriority.NULL)
return null;
if (code == RequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == RequestPriority.URGENT) if (code == RequestPriority.URGENT)
return "urgent"; return "urgent";
@ -545,7 +551,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == RequestPriority.STAT) if (code == RequestPriority.STAT)
return "stat"; return "stat";
return "?"; return "?";
} }
public String toSystem(RequestPriority code) { public String toSystem(RequestPriority code) {
return code.getSystem(); return code.getSystem();
} }
@ -650,14 +656,16 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
} }
public String toCode(ActionConditionKind code) { public String toCode(ActionConditionKind code) {
if (code == ActionConditionKind.APPLICABILITY) if (code == ActionConditionKind.NULL)
return null;
if (code == ActionConditionKind.APPLICABILITY)
return "applicability"; return "applicability";
if (code == ActionConditionKind.START) if (code == ActionConditionKind.START)
return "start"; return "start";
if (code == ActionConditionKind.STOP) if (code == ActionConditionKind.STOP)
return "stop"; return "stop";
return "?"; return "?";
} }
public String toSystem(ActionConditionKind code) { public String toSystem(ActionConditionKind code) {
return code.getSystem(); return code.getSystem();
} }
@ -846,7 +854,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
} }
public String toCode(ActionRelationshipType code) { public String toCode(ActionRelationshipType code) {
if (code == ActionRelationshipType.BEFORESTART) if (code == ActionRelationshipType.NULL)
return null;
if (code == ActionRelationshipType.BEFORESTART)
return "before-start"; return "before-start";
if (code == ActionRelationshipType.BEFORE) if (code == ActionRelationshipType.BEFORE)
return "before"; return "before";
@ -865,7 +875,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == ActionRelationshipType.AFTEREND) if (code == ActionRelationshipType.AFTEREND)
return "after-end"; return "after-end";
return "?"; return "?";
} }
public String toSystem(ActionRelationshipType code) { public String toSystem(ActionRelationshipType code) {
return code.getSystem(); return code.getSystem();
} }
@ -970,14 +980,16 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
} }
public String toCode(ActionGroupingBehavior code) { public String toCode(ActionGroupingBehavior code) {
if (code == ActionGroupingBehavior.VISUALGROUP) if (code == ActionGroupingBehavior.NULL)
return null;
if (code == ActionGroupingBehavior.VISUALGROUP)
return "visual-group"; return "visual-group";
if (code == ActionGroupingBehavior.LOGICALGROUP) if (code == ActionGroupingBehavior.LOGICALGROUP)
return "logical-group"; return "logical-group";
if (code == ActionGroupingBehavior.SENTENCEGROUP) if (code == ActionGroupingBehavior.SENTENCEGROUP)
return "sentence-group"; return "sentence-group";
return "?"; return "?";
} }
public String toSystem(ActionGroupingBehavior code) { public String toSystem(ActionGroupingBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -1124,7 +1136,9 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
} }
public String toCode(ActionSelectionBehavior code) { public String toCode(ActionSelectionBehavior code) {
if (code == ActionSelectionBehavior.ANY) if (code == ActionSelectionBehavior.NULL)
return null;
if (code == ActionSelectionBehavior.ANY)
return "any"; return "any";
if (code == ActionSelectionBehavior.ALL) if (code == ActionSelectionBehavior.ALL)
return "all"; return "all";
@ -1137,7 +1151,7 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
if (code == ActionSelectionBehavior.ONEORMORE) if (code == ActionSelectionBehavior.ONEORMORE)
return "one-or-more"; return "one-or-more";
return "?"; return "?";
} }
public String toSystem(ActionSelectionBehavior code) { public String toSystem(ActionSelectionBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -1242,14 +1256,16 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
} }
public String toCode(ActionRequiredBehavior code) { public String toCode(ActionRequiredBehavior code) {
if (code == ActionRequiredBehavior.MUST) if (code == ActionRequiredBehavior.NULL)
return null;
if (code == ActionRequiredBehavior.MUST)
return "must"; return "must";
if (code == ActionRequiredBehavior.COULD) if (code == ActionRequiredBehavior.COULD)
return "could"; return "could";
if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED) if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED)
return "must-unless-documented"; return "must-unless-documented";
return "?"; return "?";
} }
public String toSystem(ActionRequiredBehavior code) { public String toSystem(ActionRequiredBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -1340,12 +1356,14 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
} }
public String toCode(ActionPrecheckBehavior code) { public String toCode(ActionPrecheckBehavior code) {
if (code == ActionPrecheckBehavior.YES) if (code == ActionPrecheckBehavior.NULL)
return null;
if (code == ActionPrecheckBehavior.YES)
return "yes"; return "yes";
if (code == ActionPrecheckBehavior.NO) if (code == ActionPrecheckBehavior.NO)
return "no"; return "no";
return "?"; return "?";
} }
public String toSystem(ActionPrecheckBehavior code) { public String toSystem(ActionPrecheckBehavior code) {
return code.getSystem(); return code.getSystem();
} }
@ -1436,12 +1454,14 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
} }
public String toCode(ActionCardinalityBehavior code) { public String toCode(ActionCardinalityBehavior code) {
if (code == ActionCardinalityBehavior.SINGLE) if (code == ActionCardinalityBehavior.NULL)
return null;
if (code == ActionCardinalityBehavior.SINGLE)
return "single"; return "single";
if (code == ActionCardinalityBehavior.MULTIPLE) if (code == ActionCardinalityBehavior.MULTIPLE)
return "multiple"; return "multiple";
return "?"; return "?";
} }
public String toSystem(ActionCardinalityBehavior code) { public String toSystem(ActionCardinalityBehavior code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -191,7 +191,9 @@ public class ResearchStudy extends DomainResource {
throw new FHIRException("Unknown ResearchStudyStatus code '"+codeString+"'"); throw new FHIRException("Unknown ResearchStudyStatus code '"+codeString+"'");
} }
public String toCode(ResearchStudyStatus code) { public String toCode(ResearchStudyStatus code) {
if (code == ResearchStudyStatus.DRAFT) if (code == ResearchStudyStatus.NULL)
return null;
if (code == ResearchStudyStatus.DRAFT)
return "draft"; return "draft";
if (code == ResearchStudyStatus.INPROGRESS) if (code == ResearchStudyStatus.INPROGRESS)
return "in-progress"; return "in-progress";
@ -204,7 +206,7 @@ public class ResearchStudy extends DomainResource {
if (code == ResearchStudyStatus.ENTEREDINERROR) if (code == ResearchStudyStatus.ENTEREDINERROR)
return "entered-in-error"; return "entered-in-error";
return "?"; return "?";
} }
public String toSystem(ResearchStudyStatus code) { public String toSystem(ResearchStudyStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -188,7 +188,9 @@ public class ResearchSubject extends DomainResource {
throw new FHIRException("Unknown ResearchSubjectStatus code '"+codeString+"'"); throw new FHIRException("Unknown ResearchSubjectStatus code '"+codeString+"'");
} }
public String toCode(ResearchSubjectStatus code) { public String toCode(ResearchSubjectStatus code) {
if (code == ResearchSubjectStatus.CANDIDATE) if (code == ResearchSubjectStatus.NULL)
return null;
if (code == ResearchSubjectStatus.CANDIDATE)
return "candidate"; return "candidate";
if (code == ResearchSubjectStatus.ENROLLED) if (code == ResearchSubjectStatus.ENROLLED)
return "enrolled"; return "enrolled";
@ -201,7 +203,7 @@ public class ResearchSubject extends DomainResource {
if (code == ResearchSubjectStatus.COMPLETED) if (code == ResearchSubjectStatus.COMPLETED)
return "completed"; return "completed";
return "?"; return "?";
} }
public String toSystem(ResearchSubjectStatus code) { public String toSystem(ResearchSubjectStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -223,7 +223,9 @@ public class RiskAssessment extends DomainResource {
throw new FHIRException("Unknown RiskAssessmentStatus code '"+codeString+"'"); throw new FHIRException("Unknown RiskAssessmentStatus code '"+codeString+"'");
} }
public String toCode(RiskAssessmentStatus code) { public String toCode(RiskAssessmentStatus code) {
if (code == RiskAssessmentStatus.REGISTERED) if (code == RiskAssessmentStatus.NULL)
return null;
if (code == RiskAssessmentStatus.REGISTERED)
return "registered"; return "registered";
if (code == RiskAssessmentStatus.PRELIMINARY) if (code == RiskAssessmentStatus.PRELIMINARY)
return "preliminary"; return "preliminary";
@ -240,7 +242,7 @@ public class RiskAssessment extends DomainResource {
if (code == RiskAssessmentStatus.UNKNOWN) if (code == RiskAssessmentStatus.UNKNOWN)
return "unknown"; return "unknown";
return "?"; return "?";
} }
public String toSystem(RiskAssessmentStatus code) { public String toSystem(RiskAssessmentStatus code) {
return code.getSystem(); return code.getSystem();
} }

View File

@ -184,7 +184,9 @@ public class SearchParameter extends MetadataResource {
throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'"); throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'");
} }
public String toCode(XPathUsageType code) { public String toCode(XPathUsageType code) {
if (code == XPathUsageType.NORMAL) if (code == XPathUsageType.NULL)
return null;
if (code == XPathUsageType.NORMAL)
return "normal"; return "normal";
if (code == XPathUsageType.PHONETIC) if (code == XPathUsageType.PHONETIC)
return "phonetic"; return "phonetic";
@ -195,7 +197,7 @@ public class SearchParameter extends MetadataResource {
if (code == XPathUsageType.OTHER) if (code == XPathUsageType.OTHER)
return "other"; return "other";
return "?"; return "?";
} }
public String toSystem(XPathUsageType code) { public String toSystem(XPathUsageType code) {
return code.getSystem(); return code.getSystem();
} }
@ -384,7 +386,9 @@ public class SearchParameter extends MetadataResource {
throw new FHIRException("Unknown SearchComparator code '"+codeString+"'"); throw new FHIRException("Unknown SearchComparator code '"+codeString+"'");
} }
public String toCode(SearchComparator code) { public String toCode(SearchComparator code) {
if (code == SearchComparator.EQ) if (code == SearchComparator.NULL)
return null;
if (code == SearchComparator.EQ)
return "eq"; return "eq";
if (code == SearchComparator.NE) if (code == SearchComparator.NE)
return "ne"; return "ne";
@ -403,7 +407,7 @@ public class SearchParameter extends MetadataResource {
if (code == SearchComparator.AP) if (code == SearchComparator.AP)
return "ap"; return "ap";
return "?"; return "?";
} }
public String toSystem(SearchComparator code) { public String toSystem(SearchComparator code) {
return code.getSystem(); return code.getSystem();
} }
@ -606,7 +610,9 @@ public class SearchParameter extends MetadataResource {
throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'");
} }
public String toCode(SearchModifierCode code) { public String toCode(SearchModifierCode code) {
if (code == SearchModifierCode.MISSING) if (code == SearchModifierCode.NULL)
return null;
if (code == SearchModifierCode.MISSING)
return "missing"; return "missing";
if (code == SearchModifierCode.EXACT) if (code == SearchModifierCode.EXACT)
return "exact"; return "exact";
@ -627,7 +633,7 @@ public class SearchParameter extends MetadataResource {
if (code == SearchModifierCode.TYPE) if (code == SearchModifierCode.TYPE)
return "type"; return "type";
return "?"; return "?";
} }
public String toSystem(SearchModifierCode code) { public String toSystem(SearchModifierCode code) {
return code.getSystem(); return code.getSystem();
} }

Some files were not shown because too many files have changed in this diff Show More