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,6 +149,8 @@ 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.NULL)
return null;
if (code == AccountStatus.ACTIVE) if (code == AccountStatus.ACTIVE)
return "active"; return "active";
if (code == AccountStatus.INACTIVE) if (code == AccountStatus.INACTIVE)

View File

@ -1782,6 +1782,8 @@ 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.NULL)
return null;
if (code == ActivityDefinitionKind.ACCOUNT) if (code == ActivityDefinitionKind.ACCOUNT)
return "Account"; return "Account";
if (code == ActivityDefinitionKind.ACTIVITYDEFINITION) if (code == ActivityDefinitionKind.ACTIVITYDEFINITION)
@ -2126,6 +2128,8 @@ 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.NULL)
return null;
if (code == ActivityParticipantType.PATIENT) if (code == ActivityParticipantType.PATIENT)
return "patient"; return "patient";
if (code == ActivityParticipantType.PRACTITIONER) if (code == ActivityParticipantType.PRACTITIONER)

View File

@ -162,6 +162,8 @@ 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.NULL)
return null;
if (code == AddressUse.HOME) if (code == AddressUse.HOME)
return "home"; return "home";
if (code == AddressUse.WORK) if (code == AddressUse.WORK)
@ -276,6 +278,8 @@ 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.NULL)
return null;
if (code == AddressType.POSTAL) if (code == AddressType.POSTAL)
return "postal"; return "postal";
if (code == AddressType.PHYSICAL) if (code == AddressType.PHYSICAL)

View File

@ -136,6 +136,8 @@ 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.NULL)
return null;
if (code == AdverseEventCategory.AE) if (code == AdverseEventCategory.AE)
return "AE"; return "AE";
if (code == AdverseEventCategory.PAE) if (code == AdverseEventCategory.PAE)
@ -232,6 +234,8 @@ 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.NULL)
return null;
if (code == AdverseEventCausality.CAUSALITY1) if (code == AdverseEventCausality.CAUSALITY1)
return "causality1"; return "causality1";
if (code == AdverseEventCausality.CAUSALITY2) if (code == AdverseEventCausality.CAUSALITY2)

View File

@ -151,6 +151,8 @@ 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.NULL)
return null;
if (code == AllergyIntoleranceClinicalStatus.ACTIVE) if (code == AllergyIntoleranceClinicalStatus.ACTIVE)
return "active"; return "active";
if (code == AllergyIntoleranceClinicalStatus.INACTIVE) if (code == AllergyIntoleranceClinicalStatus.INACTIVE)
@ -277,6 +279,8 @@ 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.NULL)
return null;
if (code == AllergyIntoleranceVerificationStatus.UNCONFIRMED) if (code == AllergyIntoleranceVerificationStatus.UNCONFIRMED)
return "unconfirmed"; return "unconfirmed";
if (code == AllergyIntoleranceVerificationStatus.CONFIRMED) if (code == AllergyIntoleranceVerificationStatus.CONFIRMED)
@ -377,6 +381,8 @@ 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.NULL)
return null;
if (code == AllergyIntoleranceType.ALLERGY) if (code == AllergyIntoleranceType.ALLERGY)
return "allergy"; return "allergy";
if (code == AllergyIntoleranceType.INTOLERANCE) if (code == AllergyIntoleranceType.INTOLERANCE)
@ -501,6 +507,8 @@ 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.NULL)
return null;
if (code == AllergyIntoleranceCategory.FOOD) if (code == AllergyIntoleranceCategory.FOOD)
return "food"; return "food";
if (code == AllergyIntoleranceCategory.MEDICATION) if (code == AllergyIntoleranceCategory.MEDICATION)
@ -615,6 +623,8 @@ 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.NULL)
return null;
if (code == AllergyIntoleranceCriticality.LOW) if (code == AllergyIntoleranceCriticality.LOW)
return "low"; return "low";
if (code == AllergyIntoleranceCriticality.HIGH) if (code == AllergyIntoleranceCriticality.HIGH)
@ -727,6 +737,8 @@ 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.NULL)
return null;
if (code == AllergyIntoleranceSeverity.MILD) if (code == AllergyIntoleranceSeverity.MILD)
return "mild"; return "mild";
if (code == AllergyIntoleranceSeverity.MODERATE) if (code == AllergyIntoleranceSeverity.MODERATE)

View File

@ -220,6 +220,8 @@ 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.NULL)
return null;
if (code == AppointmentStatus.PROPOSED) if (code == AppointmentStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == AppointmentStatus.PENDING) if (code == AppointmentStatus.PENDING)
@ -342,6 +344,8 @@ 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.NULL)
return null;
if (code == ParticipantRequired.REQUIRED) if (code == ParticipantRequired.REQUIRED)
return "required"; return "required";
if (code == ParticipantRequired.OPTIONAL) if (code == ParticipantRequired.OPTIONAL)
@ -468,6 +472,8 @@ 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.NULL)
return null;
if (code == ParticipationStatus.ACCEPTED) if (code == ParticipationStatus.ACCEPTED)
return "accepted"; return "accepted";
if (code == ParticipationStatus.DECLINED) if (code == ParticipationStatus.DECLINED)

View File

@ -162,6 +162,8 @@ 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.NULL)
return null;
if (code == ParticipantStatus.ACCEPTED) if (code == ParticipantStatus.ACCEPTED)
return "accepted"; return "accepted";
if (code == ParticipantStatus.DECLINED) if (code == ParticipantStatus.DECLINED)

View File

@ -178,6 +178,8 @@ 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.NULL)
return null;
if (code == AuditEventAction.C) if (code == AuditEventAction.C)
return "C"; return "C";
if (code == AuditEventAction.R) if (code == AuditEventAction.R)
@ -308,6 +310,8 @@ 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.NULL)
return null;
if (code == AuditEventOutcome._0) if (code == AuditEventOutcome._0)
return "0"; return "0";
if (code == AuditEventOutcome._4) if (code == AuditEventOutcome._4)
@ -450,6 +454,8 @@ 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.NULL)
return null;
if (code == AuditEventAgentNetworkType._1) if (code == AuditEventAgentNetworkType._1)
return "1"; return "1";
if (code == AuditEventAgentNetworkType._2) if (code == AuditEventAgentNetworkType._2)

View File

@ -235,6 +235,8 @@ 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.NULL)
return null;
if (code == BundleType.DOCUMENT) if (code == BundleType.DOCUMENT)
return "document"; return "document";
if (code == BundleType.MESSAGE) if (code == BundleType.MESSAGE)
@ -359,6 +361,8 @@ 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.NULL)
return null;
if (code == SearchEntryMode.MATCH) if (code == SearchEntryMode.MATCH)
return "match"; return "match";
if (code == SearchEntryMode.INCLUDE) if (code == SearchEntryMode.INCLUDE)
@ -485,6 +489,8 @@ 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.NULL)
return null;
if (code == HTTPVerb.GET) if (code == HTTPVerb.GET)
return "GET"; return "GET";
if (code == HTTPVerb.POST) if (code == HTTPVerb.POST)

View File

@ -158,6 +158,8 @@ 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.NULL)
return null;
if (code == CapabilityStatementKind.INSTANCE) if (code == CapabilityStatementKind.INSTANCE)
return "instance"; return "instance";
if (code == CapabilityStatementKind.CAPABILITY) if (code == CapabilityStatementKind.CAPABILITY)
@ -284,6 +286,8 @@ 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.NULL)
return null;
if (code == UnknownContentCode.NO) if (code == UnknownContentCode.NO)
return "no"; return "no";
if (code == UnknownContentCode.EXTENSIONS) if (code == UnknownContentCode.EXTENSIONS)
@ -384,6 +388,8 @@ 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.NULL)
return null;
if (code == RestfulCapabilityMode.CLIENT) if (code == RestfulCapabilityMode.CLIENT)
return "client"; return "client";
if (code == RestfulCapabilityMode.SERVER) if (code == RestfulCapabilityMode.SERVER)
@ -578,6 +584,8 @@ 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.NULL)
return null;
if (code == TypeRestfulInteraction.READ) if (code == TypeRestfulInteraction.READ)
return "read"; return "read";
if (code == TypeRestfulInteraction.VREAD) if (code == TypeRestfulInteraction.VREAD)
@ -702,6 +710,8 @@ 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.NULL)
return null;
if (code == ResourceVersionPolicy.NOVERSION) if (code == ResourceVersionPolicy.NOVERSION)
return "no-version"; return "no-version";
if (code == ResourceVersionPolicy.VERSIONED) if (code == ResourceVersionPolicy.VERSIONED)
@ -828,6 +838,8 @@ 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.NULL)
return null;
if (code == ConditionalReadStatus.NOTSUPPORTED) if (code == ConditionalReadStatus.NOTSUPPORTED)
return "not-supported"; return "not-supported";
if (code == ConditionalReadStatus.MODIFIEDSINCE) if (code == ConditionalReadStatus.MODIFIEDSINCE)
@ -942,6 +954,8 @@ 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.NULL)
return null;
if (code == ConditionalDeleteStatus.NOTSUPPORTED) if (code == ConditionalDeleteStatus.NOTSUPPORTED)
return "not-supported"; return "not-supported";
if (code == ConditionalDeleteStatus.SINGLE) if (code == ConditionalDeleteStatus.SINGLE)
@ -1082,6 +1096,8 @@ 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.NULL)
return null;
if (code == ReferenceHandlingPolicy.LITERAL) if (code == ReferenceHandlingPolicy.LITERAL)
return "literal"; return "literal";
if (code == ReferenceHandlingPolicy.LOGICAL) if (code == ReferenceHandlingPolicy.LOGICAL)
@ -1212,6 +1228,8 @@ 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.NULL)
return null;
if (code == SystemRestfulInteraction.TRANSACTION) if (code == SystemRestfulInteraction.TRANSACTION)
return "transaction"; return "transaction";
if (code == SystemRestfulInteraction.BATCH) if (code == SystemRestfulInteraction.BATCH)
@ -1312,6 +1330,8 @@ 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.NULL)
return null;
if (code == EventCapabilityMode.SENDER) if (code == EventCapabilityMode.SENDER)
return "sender"; return "sender";
if (code == EventCapabilityMode.RECEIVER) if (code == EventCapabilityMode.RECEIVER)
@ -1422,6 +1442,8 @@ 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.NULL)
return null;
if (code == MessageSignificanceCategory.CONSEQUENCE) if (code == MessageSignificanceCategory.CONSEQUENCE)
return "Consequence"; return "Consequence";
if (code == MessageSignificanceCategory.CURRENCY) if (code == MessageSignificanceCategory.CURRENCY)
@ -1520,6 +1542,8 @@ 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.NULL)
return null;
if (code == DocumentMode.PRODUCER) if (code == DocumentMode.PRODUCER)
return "producer"; return "producer";
if (code == DocumentMode.CONSUMER) if (code == DocumentMode.CONSUMER)

View File

@ -206,6 +206,8 @@ 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.NULL)
return null;
if (code == CarePlanStatus.DRAFT) if (code == CarePlanStatus.DRAFT)
return "draft"; return "draft";
if (code == CarePlanStatus.ACTIVE) if (code == CarePlanStatus.ACTIVE)
@ -342,6 +344,8 @@ 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.NULL)
return null;
if (code == CarePlanIntent.PROPOSAL) if (code == CarePlanIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == CarePlanIntent.PLAN) if (code == CarePlanIntent.PLAN)
@ -512,6 +516,8 @@ 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.NULL)
return null;
if (code == CarePlanActivityStatus.NOTSTARTED) if (code == CarePlanActivityStatus.NOTSTARTED)
return "not-started"; return "not-started";
if (code == CarePlanActivityStatus.SCHEDULED) if (code == CarePlanActivityStatus.SCHEDULED)

View File

@ -177,6 +177,8 @@ 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.NULL)
return null;
if (code == CareTeamStatus.PROPOSED) if (code == CareTeamStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == CareTeamStatus.ACTIVE) if (code == CareTeamStatus.ACTIVE)

View File

@ -210,6 +210,8 @@ 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.NULL)
return null;
if (code == ChargeItemStatus.PLANNED) if (code == ChargeItemStatus.PLANNED)
return "planned"; return "planned";
if (code == ChargeItemStatus.BILLABLE) if (code == ChargeItemStatus.BILLABLE)

View File

@ -165,6 +165,8 @@ 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.NULL)
return null;
if (code == ClaimStatus.ACTIVE) if (code == ClaimStatus.ACTIVE)
return "active"; return "active";
if (code == ClaimStatus.CANCELLED) if (code == ClaimStatus.CANCELLED)
@ -293,6 +295,8 @@ 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.NULL)
return null;
if (code == Use.COMPLETE) if (code == Use.COMPLETE)
return "complete"; return "complete";
if (code == Use.PROPOSED) if (code == Use.PROPOSED)

View File

@ -164,6 +164,8 @@ 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.NULL)
return null;
if (code == ClaimResponseStatus.ACTIVE) if (code == ClaimResponseStatus.ACTIVE)
return "active"; return "active";
if (code == ClaimResponseStatus.CANCELLED) if (code == ClaimResponseStatus.CANCELLED)

View File

@ -152,6 +152,8 @@ 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.NULL)
return null;
if (code == ClinicalImpressionStatus.DRAFT) if (code == ClinicalImpressionStatus.DRAFT)
return "draft"; return "draft";
if (code == ClinicalImpressionStatus.COMPLETED) if (code == ClinicalImpressionStatus.COMPLETED)

View File

@ -169,6 +169,8 @@ 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.NULL)
return null;
if (code == CodeSystemHierarchyMeaning.GROUPEDBY) if (code == CodeSystemHierarchyMeaning.GROUPEDBY)
return "grouped-by"; return "grouped-by";
if (code == CodeSystemHierarchyMeaning.ISA) if (code == CodeSystemHierarchyMeaning.ISA)
@ -297,6 +299,8 @@ 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.NULL)
return null;
if (code == CodeSystemContentMode.NOTPRESENT) if (code == CodeSystemContentMode.NOTPRESENT)
return "not-present"; return "not-present";
if (code == CodeSystemContentMode.EXAMPLE) if (code == CodeSystemContentMode.EXAMPLE)
@ -495,6 +499,8 @@ 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.NULL)
return null;
if (code == FilterOperator.EQUAL) if (code == FilterOperator.EQUAL)
return "="; return "=";
if (code == FilterOperator.ISA) if (code == FilterOperator.ISA)
@ -661,6 +667,8 @@ 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.NULL)
return null;
if (code == PropertyType.CODE) if (code == PropertyType.CODE)
return "code"; return "code";
if (code == PropertyType.CODING) if (code == PropertyType.CODING)

View File

@ -206,6 +206,8 @@ 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.NULL)
return null;
if (code == CommunicationStatus.PREPARATION) if (code == CommunicationStatus.PREPARATION)
return "preparation"; return "preparation";
if (code == CommunicationStatus.INPROGRESS) if (code == CommunicationStatus.INPROGRESS)

View File

@ -206,6 +206,8 @@ 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.NULL)
return null;
if (code == CommunicationRequestStatus.DRAFT) if (code == CommunicationRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == CommunicationRequestStatus.ACTIVE) if (code == CommunicationRequestStatus.ACTIVE)
@ -340,6 +342,8 @@ 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.NULL)
return null;
if (code == CommunicationPriority.ROUTINE) if (code == CommunicationPriority.ROUTINE)
return "routine"; return "routine";
if (code == CommunicationPriority.URGENT) if (code == CommunicationPriority.URGENT)

View File

@ -182,6 +182,8 @@ 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.NULL)
return null;
if (code == CompartmentType.PATIENT) if (code == CompartmentType.PATIENT)
return "Patient"; return "Patient";
if (code == CompartmentType.ENCOUNTER) if (code == CompartmentType.ENCOUNTER)

View File

@ -165,6 +165,8 @@ 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.NULL)
return null;
if (code == CompositionStatus.PRELIMINARY) if (code == CompositionStatus.PRELIMINARY)
return "preliminary"; return "preliminary";
if (code == CompositionStatus.FINAL) if (code == CompositionStatus.FINAL)
@ -321,6 +323,8 @@ 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.NULL)
return null;
if (code == DocumentConfidentiality.U) if (code == DocumentConfidentiality.U)
return "U"; return "U";
if (code == DocumentConfidentiality.L) if (code == DocumentConfidentiality.L)
@ -453,6 +457,8 @@ 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.NULL)
return null;
if (code == CompositionAttestationMode.PERSONAL) if (code == CompositionAttestationMode.PERSONAL)
return "personal"; return "personal";
if (code == CompositionAttestationMode.PROFESSIONAL) if (code == CompositionAttestationMode.PROFESSIONAL)
@ -581,6 +587,8 @@ 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.NULL)
return null;
if (code == DocumentRelationshipType.REPLACES) if (code == DocumentRelationshipType.REPLACES)
return "replaces"; return "replaces";
if (code == DocumentRelationshipType.TRANSFORMS) if (code == DocumentRelationshipType.TRANSFORMS)
@ -695,6 +703,8 @@ 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.NULL)
return null;
if (code == SectionMode.WORKING) if (code == SectionMode.WORKING)
return "working"; return "working";
if (code == SectionMode.SNAPSHOT) if (code == SectionMode.SNAPSHOT)

View File

@ -158,6 +158,8 @@ 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.NULL)
return null;
if (code == ConceptMapGroupUnmappedMode.PROVIDED) if (code == ConceptMapGroupUnmappedMode.PROVIDED)
return "provided"; return "provided";
if (code == ConceptMapGroupUnmappedMode.FIXED) if (code == ConceptMapGroupUnmappedMode.FIXED)

View File

@ -178,6 +178,8 @@ 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.NULL)
return null;
if (code == ConditionClinicalStatus.ACTIVE) if (code == ConditionClinicalStatus.ACTIVE)
return "active"; return "active";
if (code == ConditionClinicalStatus.RECURRENCE) if (code == ConditionClinicalStatus.RECURRENCE)
@ -336,6 +338,8 @@ 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.NULL)
return null;
if (code == ConditionVerificationStatus.PROVISIONAL) if (code == ConditionVerificationStatus.PROVISIONAL)
return "provisional"; return "provisional";
if (code == ConditionVerificationStatus.DIFFERENTIAL) if (code == ConditionVerificationStatus.DIFFERENTIAL)

View File

@ -193,6 +193,8 @@ 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.NULL)
return null;
if (code == ConsentState.DRAFT) if (code == ConsentState.DRAFT)
return "draft"; return "draft";
if (code == ConsentState.PROPOSED) if (code == ConsentState.PROPOSED)
@ -325,6 +327,8 @@ 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.NULL)
return null;
if (code == ConsentDataMeaning.INSTANCE) if (code == ConsentDataMeaning.INSTANCE)
return "instance"; return "instance";
if (code == ConsentDataMeaning.RELATED) if (code == ConsentDataMeaning.RELATED)
@ -425,6 +429,8 @@ 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.NULL)
return null;
if (code == ConsentExceptType.DENY) if (code == ConsentExceptType.DENY)
return "deny"; return "deny";
if (code == ConsentExceptType.PERMIT) if (code == ConsentExceptType.PERMIT)

View File

@ -202,6 +202,8 @@ 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.NULL)
return null;
if (code == ContactPointSystem.PHONE) if (code == ContactPointSystem.PHONE)
return "phone"; return "phone";
if (code == ContactPointSystem.FAX) if (code == ContactPointSystem.FAX)
@ -350,6 +352,8 @@ 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.NULL)
return null;
if (code == ContactPointUse.HOME) if (code == ContactPointUse.HOME)
return "home"; return "home";
if (code == ContactPointUse.WORK) if (code == ContactPointUse.WORK)

View File

@ -322,6 +322,8 @@ 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.NULL)
return null;
if (code == ContractStatus.AMENDED) if (code == ContractStatus.AMENDED)
return "amended"; return "amended";
if (code == ContractStatus.APPENDED) if (code == ContractStatus.APPENDED)

View File

@ -161,6 +161,8 @@ 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.NULL)
return null;
if (code == ContributorType.AUTHOR) if (code == ContributorType.AUTHOR)
return "author"; return "author";
if (code == ContributorType.EDITOR) if (code == ContributorType.EDITOR)

View File

@ -163,6 +163,8 @@ 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.NULL)
return null;
if (code == CoverageStatus.ACTIVE) if (code == CoverageStatus.ACTIVE)
return "active"; return "active";
if (code == CoverageStatus.CANCELLED) if (code == CoverageStatus.CANCELLED)

View File

@ -196,6 +196,8 @@ 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.NULL)
return null;
if (code == DataElementStringency.COMPARABLE) if (code == DataElementStringency.COMPARABLE)
return "comparable"; return "comparable";
if (code == DataElementStringency.FULLYSPECIFIED) if (code == DataElementStringency.FULLYSPECIFIED)

View File

@ -220,6 +220,8 @@ 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.NULL)
return null;
if (code == DetectedIssueStatus.REGISTERED) if (code == DetectedIssueStatus.REGISTERED)
return "registered"; return "registered";
if (code == DetectedIssueStatus.PRELIMINARY) if (code == DetectedIssueStatus.PRELIMINARY)
@ -342,6 +344,8 @@ 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.NULL)
return null;
if (code == DetectedIssueSeverity.HIGH) if (code == DetectedIssueSeverity.HIGH)
return "high"; return "high";
if (code == DetectedIssueSeverity.MODERATE) if (code == DetectedIssueSeverity.MODERATE)

View File

@ -193,6 +193,8 @@ 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.NULL)
return null;
if (code == UDIEntryType.BARCODE) if (code == UDIEntryType.BARCODE)
return "barcode"; return "barcode";
if (code == UDIEntryType.RFID) if (code == UDIEntryType.RFID)
@ -325,6 +327,8 @@ 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.NULL)
return null;
if (code == FHIRDeviceStatus.ACTIVE) if (code == FHIRDeviceStatus.ACTIVE)
return "active"; return "active";
if (code == FHIRDeviceStatus.INACTIVE) if (code == FHIRDeviceStatus.INACTIVE)

View File

@ -262,6 +262,8 @@ 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.NULL)
return null;
if (code == MeasmntPrinciple.OTHER) if (code == MeasmntPrinciple.OTHER)
return "other"; return "other";
if (code == MeasmntPrinciple.CHEMICAL) if (code == MeasmntPrinciple.CHEMICAL)

View File

@ -163,6 +163,8 @@ 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.NULL)
return null;
if (code == DeviceMetricOperationalStatus.ON) if (code == DeviceMetricOperationalStatus.ON)
return "on"; return "on";
if (code == DeviceMetricOperationalStatus.OFF) if (code == DeviceMetricOperationalStatus.OFF)
@ -347,6 +349,8 @@ 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.NULL)
return null;
if (code == DeviceMetricColor.BLACK) if (code == DeviceMetricColor.BLACK)
return "black"; return "black";
if (code == DeviceMetricColor.RED) if (code == DeviceMetricColor.RED)
@ -483,6 +487,8 @@ 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.NULL)
return null;
if (code == DeviceMetricCategory.MEASUREMENT) if (code == DeviceMetricCategory.MEASUREMENT)
return "measurement"; return "measurement";
if (code == DeviceMetricCategory.SETTING) if (code == DeviceMetricCategory.SETTING)
@ -611,6 +617,8 @@ 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.NULL)
return null;
if (code == DeviceMetricCalibrationType.UNSPECIFIED) if (code == DeviceMetricCalibrationType.UNSPECIFIED)
return "unspecified"; return "unspecified";
if (code == DeviceMetricCalibrationType.OFFSET) if (code == DeviceMetricCalibrationType.OFFSET)
@ -739,6 +747,8 @@ 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.NULL)
return null;
if (code == DeviceMetricCalibrationState.NOTCALIBRATED) if (code == DeviceMetricCalibrationState.NOTCALIBRATED)
return "not-calibrated"; return "not-calibrated";
if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED) if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED)

View File

@ -206,6 +206,8 @@ 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.NULL)
return null;
if (code == DeviceRequestStatus.DRAFT) if (code == DeviceRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == DeviceRequestStatus.ACTIVE) if (code == DeviceRequestStatus.ACTIVE)
@ -340,6 +342,8 @@ 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.NULL)
return null;
if (code == RequestPriority.ROUTINE) if (code == RequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == RequestPriority.URGENT) if (code == RequestPriority.URGENT)

View File

@ -190,6 +190,8 @@ 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.NULL)
return null;
if (code == DeviceUseStatementStatus.ACTIVE) if (code == DeviceUseStatementStatus.ACTIVE)
return "active"; return "active";
if (code == DeviceUseStatementStatus.COMPLETED) if (code == DeviceUseStatementStatus.COMPLETED)

View File

@ -249,6 +249,8 @@ 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.NULL)
return null;
if (code == DiagnosticReportStatus.REGISTERED) if (code == DiagnosticReportStatus.REGISTERED)
return "registered"; return "registered";
if (code == DiagnosticReportStatus.PARTIAL) if (code == DiagnosticReportStatus.PARTIAL)

View File

@ -166,6 +166,8 @@ 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.NULL)
return null;
if (code == ReferredDocumentStatus.PRELIMINARY) if (code == ReferredDocumentStatus.PRELIMINARY)
return "preliminary"; return "preliminary";
if (code == ReferredDocumentStatus.FINAL) if (code == ReferredDocumentStatus.FINAL)
@ -294,6 +296,8 @@ 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.NULL)
return null;
if (code == DocumentRelationshipType.REPLACES) if (code == DocumentRelationshipType.REPLACES)
return "replaces"; return "replaces";
if (code == DocumentRelationshipType.TRANSFORMS) if (code == DocumentRelationshipType.TRANSFORMS)

View File

@ -181,6 +181,8 @@ 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.NULL)
return null;
if (code == PropertyRepresentation.XMLATTR) if (code == PropertyRepresentation.XMLATTR)
return "xmlAttr"; return "xmlAttr";
if (code == PropertyRepresentation.XMLTEXT) if (code == PropertyRepresentation.XMLTEXT)
@ -325,6 +327,8 @@ 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.NULL)
return null;
if (code == DiscriminatorType.VALUE) if (code == DiscriminatorType.VALUE)
return "value"; return "value";
if (code == DiscriminatorType.EXISTS) if (code == DiscriminatorType.EXISTS)
@ -441,6 +445,8 @@ 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.NULL)
return null;
if (code == SlicingRules.CLOSED) if (code == SlicingRules.CLOSED)
return "closed"; return "closed";
if (code == SlicingRules.OPEN) if (code == SlicingRules.OPEN)
@ -553,6 +559,8 @@ 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.NULL)
return null;
if (code == AggregationMode.CONTAINED) if (code == AggregationMode.CONTAINED)
return "contained"; return "contained";
if (code == AggregationMode.REFERENCED) if (code == AggregationMode.REFERENCED)
@ -665,6 +673,8 @@ 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.NULL)
return null;
if (code == ReferenceVersionRules.EITHER) if (code == ReferenceVersionRules.EITHER)
return "either"; return "either";
if (code == ReferenceVersionRules.INDEPENDENT) if (code == ReferenceVersionRules.INDEPENDENT)
@ -763,6 +773,8 @@ 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.NULL)
return null;
if (code == ConstraintSeverity.ERROR) if (code == ConstraintSeverity.ERROR)
return "error"; return "error";
if (code == ConstraintSeverity.WARNING) if (code == ConstraintSeverity.WARNING)

View File

@ -163,6 +163,8 @@ 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.NULL)
return null;
if (code == EligibilityRequestStatus.ACTIVE) if (code == EligibilityRequestStatus.ACTIVE)
return "active"; return "active";
if (code == EligibilityRequestStatus.CANCELLED) if (code == EligibilityRequestStatus.CANCELLED)

View File

@ -165,6 +165,8 @@ 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.NULL)
return null;
if (code == EligibilityResponseStatus.ACTIVE) if (code == EligibilityResponseStatus.ACTIVE)
return "active"; return "active";
if (code == EligibilityResponseStatus.CANCELLED) if (code == EligibilityResponseStatus.CANCELLED)

View File

@ -232,6 +232,8 @@ 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.NULL)
return null;
if (code == EncounterStatus.PLANNED) if (code == EncounterStatus.PLANNED)
return "planned"; return "planned";
if (code == EncounterStatus.ARRIVED) if (code == EncounterStatus.ARRIVED)
@ -374,6 +376,8 @@ 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.NULL)
return null;
if (code == EncounterLocationStatus.PLANNED) if (code == EncounterLocationStatus.PLANNED)
return "planned"; return "planned";
if (code == EncounterLocationStatus.ACTIVE) if (code == EncounterLocationStatus.ACTIVE)

View File

@ -189,6 +189,8 @@ 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.NULL)
return null;
if (code == EndpointStatus.ACTIVE) if (code == EndpointStatus.ACTIVE)
return "active"; return "active";
if (code == EndpointStatus.SUSPENDED) if (code == EndpointStatus.SUSPENDED)

View File

@ -161,6 +161,8 @@ 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.NULL)
return null;
if (code == EnrollmentRequestStatus.ACTIVE) if (code == EnrollmentRequestStatus.ACTIVE)
return "active"; return "active";
if (code == EnrollmentRequestStatus.CANCELLED) if (code == EnrollmentRequestStatus.CANCELLED)

View File

@ -162,6 +162,8 @@ 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.NULL)
return null;
if (code == EnrollmentResponseStatus.ACTIVE) if (code == EnrollmentResponseStatus.ACTIVE)
return "active"; return "active";
if (code == EnrollmentResponseStatus.CANCELLED) if (code == EnrollmentResponseStatus.CANCELLED)

View File

@ -136,6 +136,8 @@ 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.NULL)
return null;
if (code == AbstractType.TYPE) if (code == AbstractType.TYPE)
return "Type"; return "Type";
if (code == AbstractType.ANY) if (code == AbstractType.ANY)
@ -257,6 +259,8 @@ 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.NULL)
return null;
if (code == AdministrativeGender.MALE) if (code == AdministrativeGender.MALE)
return "male"; return "male";
if (code == AdministrativeGender.FEMALE) if (code == AdministrativeGender.FEMALE)
@ -410,6 +414,8 @@ 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.NULL)
return null;
if (code == AgeUnits.MIN) if (code == AgeUnits.MIN)
return "min"; return "min";
if (code == AgeUnits.H) if (code == AgeUnits.H)
@ -539,6 +545,8 @@ 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.NULL)
return null;
if (code == BindingStrength.REQUIRED) if (code == BindingStrength.REQUIRED)
return "required"; return "required";
if (code == BindingStrength.EXTENSIBLE) if (code == BindingStrength.EXTENSIBLE)
@ -748,6 +756,8 @@ 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.NULL)
return null;
if (code == ConceptMapEquivalence.RELATEDTO) if (code == ConceptMapEquivalence.RELATEDTO)
return "relatedto"; return "relatedto";
if (code == ConceptMapEquivalence.EQUIVALENT) if (code == ConceptMapEquivalence.EQUIVALENT)
@ -969,6 +979,8 @@ 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.NULL)
return null;
if (code == DataAbsentReason.UNKNOWN) if (code == DataAbsentReason.UNKNOWN)
return "unknown"; return "unknown";
if (code == DataAbsentReason.ASKED) if (code == DataAbsentReason.ASKED)
@ -1806,6 +1818,8 @@ 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.NULL)
return null;
if (code == DataType.ADDRESS) if (code == DataType.ADDRESS)
return "Address"; return "Address";
if (code == DataType.AGE) if (code == DataType.AGE)
@ -2017,6 +2031,8 @@ 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.NULL)
return null;
if (code == DocumentReferenceStatus.CURRENT) if (code == DocumentReferenceStatus.CURRENT)
return "current"; return "current";
if (code == DocumentReferenceStatus.SUPERSEDED) if (code == DocumentReferenceStatus.SUPERSEDED)
@ -4536,6 +4552,8 @@ 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.NULL)
return null;
if (code == FHIRAllTypes.ADDRESS) if (code == FHIRAllTypes.ADDRESS)
return "Address"; return "Address";
if (code == FHIRAllTypes.AGE) if (code == FHIRAllTypes.AGE)
@ -7371,6 +7389,8 @@ 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.NULL)
return null;
if (code == FHIRDefinedType.ADDRESS) if (code == FHIRDefinedType.ADDRESS)
return "Address"; return "Address";
if (code == FHIRDefinedType.AGE) if (code == FHIRDefinedType.AGE)
@ -7946,6 +7966,8 @@ 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.NULL)
return null;
if (code == MessageEvent.CODESYSTEMEXPAND) if (code == MessageEvent.CODESYSTEMEXPAND)
return "CodeSystem-expand"; return "CodeSystem-expand";
if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE) if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE)
@ -8073,6 +8095,8 @@ 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.NULL)
return null;
if (code == NoteType.DISPLAY) if (code == NoteType.DISPLAY)
return "display"; return "display";
if (code == NoteType.PRINT) if (code == NoteType.PRINT)
@ -8196,6 +8220,8 @@ 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.NULL)
return null;
if (code == PublicationStatus.DRAFT) if (code == PublicationStatus.DRAFT)
return "draft"; return "draft";
if (code == PublicationStatus.ACTIVE) if (code == PublicationStatus.ACTIVE)
@ -8307,6 +8333,8 @@ 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.NULL)
return null;
if (code == RemittanceOutcome.COMPLETE) if (code == RemittanceOutcome.COMPLETE)
return "complete"; return "complete";
if (code == RemittanceOutcome.ERROR) if (code == RemittanceOutcome.ERROR)
@ -10042,6 +10070,8 @@ 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.NULL)
return null;
if (code == ResourceType.ACCOUNT) if (code == ResourceType.ACCOUNT)
return "Account"; return "Account";
if (code == ResourceType.ACTIVITYDEFINITION) if (code == ResourceType.ACTIVITYDEFINITION)
@ -10453,6 +10483,8 @@ 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.NULL)
return null;
if (code == SearchParamType.NUMBER) if (code == SearchParamType.NUMBER)
return "number"; return "number";
if (code == SearchParamType.DATE) if (code == SearchParamType.DATE)
@ -10614,6 +10646,8 @@ 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.NULL)
return null;
if (code == SpecialValues.TRUE) if (code == SpecialValues.TRUE)
return "true"; return "true";
if (code == SpecialValues.FALSE) if (code == SpecialValues.FALSE)

View File

@ -204,6 +204,8 @@ 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.NULL)
return null;
if (code == EpisodeOfCareStatus.PLANNED) if (code == EpisodeOfCareStatus.PLANNED)
return "planned"; return "planned";
if (code == EpisodeOfCareStatus.WAITLIST) if (code == EpisodeOfCareStatus.WAITLIST)

View File

@ -154,6 +154,8 @@ 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.NULL)
return null;
if (code == SystemVersionProcessingMode.DEFAULT) if (code == SystemVersionProcessingMode.DEFAULT)
return "default"; return "default";
if (code == SystemVersionProcessingMode.CHECK) if (code == SystemVersionProcessingMode.CHECK)

View File

@ -165,6 +165,8 @@ 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.NULL)
return null;
if (code == ExplanationOfBenefitStatus.ACTIVE) if (code == ExplanationOfBenefitStatus.ACTIVE)
return "active"; return "active";
if (code == ExplanationOfBenefitStatus.CANCELLED) if (code == ExplanationOfBenefitStatus.CANCELLED)

View File

@ -167,6 +167,8 @@ 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.NULL)
return null;
if (code == FamilyHistoryStatus.PARTIAL) if (code == FamilyHistoryStatus.PARTIAL)
return "partial"; return "partial";
if (code == FamilyHistoryStatus.COMPLETED) if (code == FamilyHistoryStatus.COMPLETED)

View File

@ -146,6 +146,8 @@ 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.NULL)
return null;
if (code == FlagStatus.ACTIVE) if (code == FlagStatus.ACTIVE)
return "active"; return "active";
if (code == FlagStatus.INACTIVE) if (code == FlagStatus.INACTIVE)

View File

@ -291,6 +291,8 @@ 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.NULL)
return null;
if (code == GoalStatus.PROPOSED) if (code == GoalStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == GoalStatus.ACCEPTED) if (code == GoalStatus.ACCEPTED)

View File

@ -183,6 +183,8 @@ 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.NULL)
return null;
if (code == CompartmentCode.PATIENT) if (code == CompartmentCode.PATIENT)
return "Patient"; return "Patient";
if (code == CompartmentCode.ENCOUNTER) if (code == CompartmentCode.ENCOUNTER)
@ -313,6 +315,8 @@ 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.NULL)
return null;
if (code == GraphCompartmentRule.IDENTICAL) if (code == GraphCompartmentRule.IDENTICAL)
return "identical"; return "identical";
if (code == GraphCompartmentRule.MATCHING) if (code == GraphCompartmentRule.MATCHING)

View File

@ -192,6 +192,8 @@ 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.NULL)
return null;
if (code == GroupType.PERSON) if (code == GroupType.PERSON)
return "person"; return "person";
if (code == GroupType.ANIMAL) if (code == GroupType.ANIMAL)

View File

@ -191,6 +191,8 @@ 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.NULL)
return null;
if (code == GuidanceResponseStatus.SUCCESS) if (code == GuidanceResponseStatus.SUCCESS)
return "success"; return "success";
if (code == GuidanceResponseStatus.DATAREQUESTED) if (code == GuidanceResponseStatus.DATAREQUESTED)

View File

@ -206,6 +206,8 @@ 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.NULL)
return null;
if (code == DaysOfWeek.MON) if (code == DaysOfWeek.MON)
return "mon"; return "mon";
if (code == DaysOfWeek.TUE) if (code == DaysOfWeek.TUE)

View File

@ -205,6 +205,8 @@ 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.NULL)
return null;
if (code == NameUse.USUAL) if (code == NameUse.USUAL)
return "usual"; return "usual";
if (code == NameUse.OFFICIAL) if (code == NameUse.OFFICIAL)

View File

@ -160,6 +160,8 @@ 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.NULL)
return null;
if (code == IdentifierUse.USUAL) if (code == IdentifierUse.USUAL)
return "usual"; return "usual";
if (code == IdentifierUse.OFFICIAL) if (code == IdentifierUse.OFFICIAL)

View File

@ -164,6 +164,8 @@ 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.NULL)
return null;
if (code == InstanceAvailability.ONLINE) if (code == InstanceAvailability.ONLINE)
return "ONLINE"; return "ONLINE";
if (code == InstanceAvailability.OFFLINE) if (code == InstanceAvailability.OFFLINE)

View File

@ -136,6 +136,8 @@ 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.NULL)
return null;
if (code == ImmunizationStatus.COMPLETED) if (code == ImmunizationStatus.COMPLETED)
return "completed"; return "completed";
if (code == ImmunizationStatus.ENTEREDINERROR) if (code == ImmunizationStatus.ENTEREDINERROR)

View File

@ -141,6 +141,8 @@ 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.NULL)
return null;
if (code == GuideDependencyType.REFERENCE) if (code == GuideDependencyType.REFERENCE)
return "reference"; return "reference";
if (code == GuideDependencyType.INCLUSION) if (code == GuideDependencyType.INCLUSION)
@ -321,6 +323,8 @@ 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.NULL)
return null;
if (code == GuidePageKind.PAGE) if (code == GuidePageKind.PAGE)
return "page"; return "page";
if (code == GuidePageKind.EXAMPLE) if (code == GuidePageKind.EXAMPLE)

View File

@ -149,6 +149,8 @@ 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.NULL)
return null;
if (code == LinkageType.SOURCE) if (code == LinkageType.SOURCE)
return "source"; return "source";
if (code == LinkageType.ALTERNATE) if (code == LinkageType.ALTERNATE)

View File

@ -150,6 +150,8 @@ 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.NULL)
return null;
if (code == ListStatus.CURRENT) if (code == ListStatus.CURRENT)
return "current"; return "current";
if (code == ListStatus.RETIRED) if (code == ListStatus.RETIRED)
@ -262,6 +264,8 @@ 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.NULL)
return null;
if (code == ListMode.WORKING) if (code == ListMode.WORKING)
return "working"; return "working";
if (code == ListMode.SNAPSHOT) if (code == ListMode.SNAPSHOT)

View File

@ -152,6 +152,8 @@ 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.NULL)
return null;
if (code == LocationStatus.ACTIVE) if (code == LocationStatus.ACTIVE)
return "active"; return "active";
if (code == LocationStatus.SUSPENDED) if (code == LocationStatus.SUSPENDED)
@ -250,6 +252,8 @@ 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.NULL)
return null;
if (code == LocationMode.INSTANCE) if (code == LocationMode.INSTANCE)
return "instance"; return "instance";
if (code == LocationMode.KIND) if (code == LocationMode.KIND)

View File

@ -152,6 +152,8 @@ 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.NULL)
return null;
if (code == MeasureReportStatus.COMPLETE) if (code == MeasureReportStatus.COMPLETE)
return "complete"; return "complete";
if (code == MeasureReportStatus.PENDING) if (code == MeasureReportStatus.PENDING)
@ -264,6 +266,8 @@ 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.NULL)
return null;
if (code == MeasureReportType.INDIVIDUAL) if (code == MeasureReportType.INDIVIDUAL)
return "individual"; return "individual";
if (code == MeasureReportType.PATIENTLIST) if (code == MeasureReportType.PATIENTLIST)

View File

@ -148,6 +148,8 @@ 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.NULL)
return null;
if (code == DigitalMediaType.PHOTO) if (code == DigitalMediaType.PHOTO)
return "photo"; return "photo";
if (code == DigitalMediaType.VIDEO) if (code == DigitalMediaType.VIDEO)

View File

@ -151,6 +151,8 @@ 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.NULL)
return null;
if (code == MedicationStatus.ACTIVE) if (code == MedicationStatus.ACTIVE)
return "active"; return "active";
if (code == MedicationStatus.INACTIVE) if (code == MedicationStatus.INACTIVE)

View File

@ -193,6 +193,8 @@ 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.NULL)
return null;
if (code == MedicationAdministrationStatus.INPROGRESS) if (code == MedicationAdministrationStatus.INPROGRESS)
return "in-progress"; return "in-progress";
if (code == MedicationAdministrationStatus.ONHOLD) if (code == MedicationAdministrationStatus.ONHOLD)

View File

@ -193,6 +193,8 @@ 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.NULL)
return null;
if (code == MedicationDispenseStatus.PREPARATION) if (code == MedicationDispenseStatus.PREPARATION)
return "preparation"; return "preparation";
if (code == MedicationDispenseStatus.INPROGRESS) if (code == MedicationDispenseStatus.INPROGRESS)

View File

@ -221,6 +221,8 @@ 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.NULL)
return null;
if (code == MedicationRequestStatus.ACTIVE) if (code == MedicationRequestStatus.ACTIVE)
return "active"; return "active";
if (code == MedicationRequestStatus.ONHOLD) if (code == MedicationRequestStatus.ONHOLD)
@ -357,6 +359,8 @@ 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.NULL)
return null;
if (code == MedicationRequestIntent.PROPOSAL) if (code == MedicationRequestIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == MedicationRequestIntent.PLAN) if (code == MedicationRequestIntent.PLAN)
@ -485,6 +489,8 @@ 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.NULL)
return null;
if (code == MedicationRequestPriority.ROUTINE) if (code == MedicationRequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == MedicationRequestPriority.URGENT) if (code == MedicationRequestPriority.URGENT)

View File

@ -192,6 +192,8 @@ 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.NULL)
return null;
if (code == MedicationStatementStatus.ACTIVE) if (code == MedicationStatementStatus.ACTIVE)
return "active"; return "active";
if (code == MedicationStatementStatus.COMPLETED) if (code == MedicationStatementStatus.COMPLETED)
@ -324,6 +326,8 @@ 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.NULL)
return null;
if (code == MedicationStatementTaken.Y) if (code == MedicationStatementTaken.Y)
return "y"; return "y";
if (code == MedicationStatementTaken.N) if (code == MedicationStatementTaken.N)

View File

@ -154,6 +154,8 @@ 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.NULL)
return null;
if (code == MessageSignificanceCategory.CONSEQUENCE) if (code == MessageSignificanceCategory.CONSEQUENCE)
return "Consequence"; return "Consequence";
if (code == MessageSignificanceCategory.CURRENCY) if (code == MessageSignificanceCategory.CURRENCY)

View File

@ -150,6 +150,8 @@ 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.NULL)
return null;
if (code == ResponseType.OK) if (code == ResponseType.OK)
return "ok"; return "ok";
if (code == ResponseType.TRANSIENTERROR) if (code == ResponseType.TRANSIENTERROR)

View File

@ -154,6 +154,8 @@ 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.NULL)
return null;
if (code == NamingSystemType.CODESYSTEM) if (code == NamingSystemType.CODESYSTEM)
return "codesystem"; return "codesystem";
if (code == NamingSystemType.IDENTIFIER) if (code == NamingSystemType.IDENTIFIER)
@ -280,6 +282,8 @@ 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.NULL)
return null;
if (code == NamingSystemIdentifierType.OID) if (code == NamingSystemIdentifierType.OID)
return "oid"; return "oid";
if (code == NamingSystemIdentifierType.UUID) if (code == NamingSystemIdentifierType.UUID)

View File

@ -160,6 +160,8 @@ 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.NULL)
return null;
if (code == NarrativeStatus.GENERATED) if (code == NarrativeStatus.GENERATED)
return "generated"; return "generated";
if (code == NarrativeStatus.EXTENSIONS) if (code == NarrativeStatus.EXTENSIONS)

View File

@ -235,6 +235,8 @@ 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.NULL)
return null;
if (code == NutritionOrderStatus.PROPOSED) if (code == NutritionOrderStatus.PROPOSED)
return "proposed"; return "proposed";
if (code == NutritionOrderStatus.DRAFT) if (code == NutritionOrderStatus.DRAFT)

View File

@ -222,6 +222,8 @@ 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.NULL)
return null;
if (code == ObservationStatus.REGISTERED) if (code == ObservationStatus.REGISTERED)
return "registered"; return "registered";
if (code == ObservationStatus.PRELIMINARY) if (code == ObservationStatus.PRELIMINARY)
@ -386,6 +388,8 @@ 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.NULL)
return null;
if (code == ObservationRelationshipType.HASMEMBER) if (code == ObservationRelationshipType.HASMEMBER)
return "has-member"; return "has-member";
if (code == ObservationRelationshipType.DERIVEDFROM) if (code == ObservationRelationshipType.DERIVEDFROM)

View File

@ -145,6 +145,8 @@ 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.NULL)
return null;
if (code == OperationKind.OPERATION) if (code == OperationKind.OPERATION)
return "operation"; return "operation";
if (code == OperationKind.QUERY) if (code == OperationKind.QUERY)
@ -241,6 +243,8 @@ 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.NULL)
return null;
if (code == OperationParameterUse.IN) if (code == OperationParameterUse.IN)
return "in"; return "in";
if (code == OperationParameterUse.OUT) if (code == OperationParameterUse.OUT)

View File

@ -164,6 +164,8 @@ 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.NULL)
return null;
if (code == IssueSeverity.FATAL) if (code == IssueSeverity.FATAL)
return "fatal"; return "fatal";
if (code == IssueSeverity.ERROR) if (code == IssueSeverity.ERROR)
@ -642,6 +644,8 @@ 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.NULL)
return null;
if (code == IssueType.INVALID) if (code == IssueType.INVALID)
return "invalid"; return "invalid";
if (code == IssueType.STRUCTURE) if (code == IssueType.STRUCTURE)

View File

@ -132,6 +132,8 @@ 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.NULL)
return null;
if (code == ParameterUse.IN) if (code == ParameterUse.IN)
return "in"; return "in";
if (code == ParameterUse.OUT) if (code == ParameterUse.OUT)

View File

@ -166,6 +166,8 @@ 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.NULL)
return null;
if (code == LinkType.REPLACEDBY) if (code == LinkType.REPLACEDBY)
return "replaced-by"; return "replaced-by";
if (code == LinkType.REPLACES) if (code == LinkType.REPLACES)

View File

@ -161,6 +161,8 @@ 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.NULL)
return null;
if (code == PaymentNoticeStatus.ACTIVE) if (code == PaymentNoticeStatus.ACTIVE)
return "active"; return "active";
if (code == PaymentNoticeStatus.CANCELLED) if (code == PaymentNoticeStatus.CANCELLED)

View File

@ -164,6 +164,8 @@ 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.NULL)
return null;
if (code == PaymentReconciliationStatus.ACTIVE) if (code == PaymentReconciliationStatus.ACTIVE)
return "active"; return "active";
if (code == PaymentReconciliationStatus.CANCELLED) if (code == PaymentReconciliationStatus.CANCELLED)

View File

@ -165,6 +165,8 @@ 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.NULL)
return null;
if (code == IdentityAssuranceLevel.LEVEL1) if (code == IdentityAssuranceLevel.LEVEL1)
return "level1"; return "level1";
if (code == IdentityAssuranceLevel.LEVEL2) if (code == IdentityAssuranceLevel.LEVEL2)

View File

@ -155,6 +155,8 @@ 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.NULL)
return null;
if (code == ActionConditionKind.APPLICABILITY) if (code == ActionConditionKind.APPLICABILITY)
return "applicability"; return "applicability";
if (code == ActionConditionKind.START) if (code == ActionConditionKind.START)
@ -351,6 +353,8 @@ 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.NULL)
return null;
if (code == ActionRelationshipType.BEFORESTART) if (code == ActionRelationshipType.BEFORESTART)
return "before-start"; return "before-start";
if (code == ActionRelationshipType.BEFORE) if (code == ActionRelationshipType.BEFORE)
@ -475,6 +479,8 @@ 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.NULL)
return null;
if (code == ActionParticipantType.PATIENT) if (code == ActionParticipantType.PATIENT)
return "patient"; return "patient";
if (code == ActionParticipantType.PRACTITIONER) if (code == ActionParticipantType.PRACTITIONER)
@ -587,6 +593,8 @@ 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.NULL)
return null;
if (code == ActionGroupingBehavior.VISUALGROUP) if (code == ActionGroupingBehavior.VISUALGROUP)
return "visual-group"; return "visual-group";
if (code == ActionGroupingBehavior.LOGICALGROUP) if (code == ActionGroupingBehavior.LOGICALGROUP)
@ -741,6 +749,8 @@ 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.NULL)
return null;
if (code == ActionSelectionBehavior.ANY) if (code == ActionSelectionBehavior.ANY)
return "any"; return "any";
if (code == ActionSelectionBehavior.ALL) if (code == ActionSelectionBehavior.ALL)
@ -859,6 +869,8 @@ 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.NULL)
return null;
if (code == ActionRequiredBehavior.MUST) if (code == ActionRequiredBehavior.MUST)
return "must"; return "must";
if (code == ActionRequiredBehavior.COULD) if (code == ActionRequiredBehavior.COULD)
@ -957,6 +969,8 @@ 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.NULL)
return null;
if (code == ActionPrecheckBehavior.YES) if (code == ActionPrecheckBehavior.YES)
return "yes"; return "yes";
if (code == ActionPrecheckBehavior.NO) if (code == ActionPrecheckBehavior.NO)
@ -1053,6 +1067,8 @@ 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.NULL)
return null;
if (code == ActionCardinalityBehavior.SINGLE) if (code == ActionCardinalityBehavior.SINGLE)
return "single"; return "single";
if (code == ActionCardinalityBehavior.MULTIPLE) if (code == ActionCardinalityBehavior.MULTIPLE)

View File

@ -206,6 +206,8 @@ 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.NULL)
return null;
if (code == DaysOfWeek.MON) if (code == DaysOfWeek.MON)
return "mon"; return "mon";
if (code == DaysOfWeek.TUE) if (code == DaysOfWeek.TUE)

View File

@ -205,6 +205,8 @@ 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.NULL)
return null;
if (code == ProcedureStatus.PREPARATION) if (code == ProcedureStatus.PREPARATION)
return "preparation"; return "preparation";
if (code == ProcedureStatus.INPROGRESS) if (code == ProcedureStatus.INPROGRESS)

View File

@ -206,6 +206,8 @@ 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.NULL)
return null;
if (code == ProcedureRequestStatus.DRAFT) if (code == ProcedureRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == ProcedureRequestStatus.ACTIVE) if (code == ProcedureRequestStatus.ACTIVE)
@ -398,6 +400,8 @@ 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.NULL)
return null;
if (code == ProcedureRequestIntent.PROPOSAL) if (code == ProcedureRequestIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == ProcedureRequestIntent.PLAN) if (code == ProcedureRequestIntent.PLAN)
@ -534,6 +538,8 @@ 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.NULL)
return null;
if (code == ProcedureRequestPriority.ROUTINE) if (code == ProcedureRequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == ProcedureRequestPriority.URGENT) if (code == ProcedureRequestPriority.URGENT)

View File

@ -165,6 +165,8 @@ 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.NULL)
return null;
if (code == ProcessRequestStatus.ACTIVE) if (code == ProcessRequestStatus.ACTIVE)
return "active"; return "active";
if (code == ProcessRequestStatus.CANCELLED) if (code == ProcessRequestStatus.CANCELLED)
@ -293,6 +295,8 @@ 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.NULL)
return null;
if (code == ActionList.CANCEL) if (code == ActionList.CANCEL)
return "cancel"; return "cancel";
if (code == ActionList.POLL) if (code == ActionList.POLL)

View File

@ -164,6 +164,8 @@ 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.NULL)
return null;
if (code == ProcessResponseStatus.ACTIVE) if (code == ProcessResponseStatus.ACTIVE)
return "active"; return "active";
if (code == ProcessResponseStatus.CANCELLED) if (code == ProcessResponseStatus.CANCELLED)

View File

@ -179,6 +179,8 @@ 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.NULL)
return null;
if (code == ProvenanceEntityRole.DERIVATION) if (code == ProvenanceEntityRole.DERIVATION)
return "derivation"; return "derivation";
if (code == ProvenanceEntityRole.REVISION) if (code == ProvenanceEntityRole.REVISION)

View File

@ -160,6 +160,8 @@ 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.NULL)
return null;
if (code == QuantityComparator.LESS_THAN) if (code == QuantityComparator.LESS_THAN)
return "<"; return "<";
if (code == QuantityComparator.LESS_OR_EQUAL) if (code == QuantityComparator.LESS_OR_EQUAL)

View File

@ -354,6 +354,8 @@ 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.NULL)
return null;
if (code == QuestionnaireItemType.GROUP) if (code == QuestionnaireItemType.GROUP)
return "group"; return "group";
if (code == QuestionnaireItemType.DISPLAY) if (code == QuestionnaireItemType.DISPLAY)

View File

@ -180,6 +180,8 @@ 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.NULL)
return null;
if (code == QuestionnaireResponseStatus.INPROGRESS) if (code == QuestionnaireResponseStatus.INPROGRESS)
return "in-progress"; return "in-progress";
if (code == QuestionnaireResponseStatus.COMPLETED) if (code == QuestionnaireResponseStatus.COMPLETED)

View File

@ -208,6 +208,8 @@ 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.NULL)
return null;
if (code == ReferralRequestStatus.DRAFT) if (code == ReferralRequestStatus.DRAFT)
return "draft"; return "draft";
if (code == ReferralRequestStatus.ACTIVE) if (code == ReferralRequestStatus.ACTIVE)
@ -400,6 +402,8 @@ 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.NULL)
return null;
if (code == ReferralCategory.PROPOSAL) if (code == ReferralCategory.PROPOSAL)
return "proposal"; return "proposal";
if (code == ReferralCategory.PLAN) if (code == ReferralCategory.PLAN)
@ -536,6 +540,8 @@ 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.NULL)
return null;
if (code == ReferralPriority.ROUTINE) if (code == ReferralPriority.ROUTINE)
return "routine"; return "routine";
if (code == ReferralPriority.URGENT) if (code == ReferralPriority.URGENT)

View File

@ -216,6 +216,8 @@ 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.NULL)
return null;
if (code == RelatedArtifactType.DOCUMENTATION) if (code == RelatedArtifactType.DOCUMENTATION)
return "documentation"; return "documentation";
if (code == RelatedArtifactType.JUSTIFICATION) if (code == RelatedArtifactType.JUSTIFICATION)

View File

@ -208,6 +208,8 @@ 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.NULL)
return null;
if (code == RequestStatus.DRAFT) if (code == RequestStatus.DRAFT)
return "draft"; return "draft";
if (code == RequestStatus.ACTIVE) if (code == RequestStatus.ACTIVE)
@ -400,6 +402,8 @@ 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.NULL)
return null;
if (code == RequestIntent.PROPOSAL) if (code == RequestIntent.PROPOSAL)
return "proposal"; return "proposal";
if (code == RequestIntent.PLAN) if (code == RequestIntent.PLAN)
@ -536,6 +540,8 @@ 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.NULL)
return null;
if (code == RequestPriority.ROUTINE) if (code == RequestPriority.ROUTINE)
return "routine"; return "routine";
if (code == RequestPriority.URGENT) if (code == RequestPriority.URGENT)
@ -650,6 +656,8 @@ 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.NULL)
return null;
if (code == ActionConditionKind.APPLICABILITY) if (code == ActionConditionKind.APPLICABILITY)
return "applicability"; return "applicability";
if (code == ActionConditionKind.START) if (code == ActionConditionKind.START)
@ -846,6 +854,8 @@ 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.NULL)
return null;
if (code == ActionRelationshipType.BEFORESTART) if (code == ActionRelationshipType.BEFORESTART)
return "before-start"; return "before-start";
if (code == ActionRelationshipType.BEFORE) if (code == ActionRelationshipType.BEFORE)
@ -970,6 +980,8 @@ 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.NULL)
return null;
if (code == ActionGroupingBehavior.VISUALGROUP) if (code == ActionGroupingBehavior.VISUALGROUP)
return "visual-group"; return "visual-group";
if (code == ActionGroupingBehavior.LOGICALGROUP) if (code == ActionGroupingBehavior.LOGICALGROUP)
@ -1124,6 +1136,8 @@ 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.NULL)
return null;
if (code == ActionSelectionBehavior.ANY) if (code == ActionSelectionBehavior.ANY)
return "any"; return "any";
if (code == ActionSelectionBehavior.ALL) if (code == ActionSelectionBehavior.ALL)
@ -1242,6 +1256,8 @@ 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.NULL)
return null;
if (code == ActionRequiredBehavior.MUST) if (code == ActionRequiredBehavior.MUST)
return "must"; return "must";
if (code == ActionRequiredBehavior.COULD) if (code == ActionRequiredBehavior.COULD)
@ -1340,6 +1356,8 @@ 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.NULL)
return null;
if (code == ActionPrecheckBehavior.YES) if (code == ActionPrecheckBehavior.YES)
return "yes"; return "yes";
if (code == ActionPrecheckBehavior.NO) if (code == ActionPrecheckBehavior.NO)
@ -1436,6 +1454,8 @@ 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.NULL)
return null;
if (code == ActionCardinalityBehavior.SINGLE) if (code == ActionCardinalityBehavior.SINGLE)
return "single"; return "single";
if (code == ActionCardinalityBehavior.MULTIPLE) if (code == ActionCardinalityBehavior.MULTIPLE)

View File

@ -191,6 +191,8 @@ 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.NULL)
return null;
if (code == ResearchStudyStatus.DRAFT) if (code == ResearchStudyStatus.DRAFT)
return "draft"; return "draft";
if (code == ResearchStudyStatus.INPROGRESS) if (code == ResearchStudyStatus.INPROGRESS)

View File

@ -188,6 +188,8 @@ 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.NULL)
return null;
if (code == ResearchSubjectStatus.CANDIDATE) if (code == ResearchSubjectStatus.CANDIDATE)
return "candidate"; return "candidate";
if (code == ResearchSubjectStatus.ENROLLED) if (code == ResearchSubjectStatus.ENROLLED)

View File

@ -223,6 +223,8 @@ 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.NULL)
return null;
if (code == RiskAssessmentStatus.REGISTERED) if (code == RiskAssessmentStatus.REGISTERED)
return "registered"; return "registered";
if (code == RiskAssessmentStatus.PRELIMINARY) if (code == RiskAssessmentStatus.PRELIMINARY)

View File

@ -184,6 +184,8 @@ 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.NULL)
return null;
if (code == XPathUsageType.NORMAL) if (code == XPathUsageType.NORMAL)
return "normal"; return "normal";
if (code == XPathUsageType.PHONETIC) if (code == XPathUsageType.PHONETIC)
@ -384,6 +386,8 @@ 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.NULL)
return null;
if (code == SearchComparator.EQ) if (code == SearchComparator.EQ)
return "eq"; return "eq";
if (code == SearchComparator.NE) if (code == SearchComparator.NE)
@ -606,6 +610,8 @@ 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.NULL)
return null;
if (code == SearchModifierCode.MISSING) if (code == SearchModifierCode.MISSING)
return "missing"; return "missing";
if (code == SearchModifierCode.EXACT) if (code == SearchModifierCode.EXACT)

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