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

* Return null for all toCode enum params that are null

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

This reverts commit 97a61b2ff9.

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

View File

@ -150,7 +150,10 @@ public class Account extends DomainResource {
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)
return "active";
if (code == AccountStatus.INACTIVE)

View File

@ -188,7 +188,10 @@ public class Address extends Type implements ICompositeType {
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)
return "home";
if (code == AddressUse.WORK)
@ -321,7 +324,10 @@ public class Address extends Type implements ICompositeType {
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)
return "postal";
if (code == AddressType.PHYSICAL)

View File

@ -248,7 +248,10 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceStatus code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceStatus code) {
public String toCode(AllergyIntoleranceStatus code)
{
if (code == AllergyIntoleranceStatus.NULL)
return null;
if (code == AllergyIntoleranceStatus.ACTIVE)
return "active";
if (code == AllergyIntoleranceStatus.UNCONFIRMED)
@ -394,7 +397,10 @@ public class AllergyIntolerance extends DomainResource {
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.CRITL)
return "CRITL";
if (code == AllergyIntoleranceCriticality.CRITH)
@ -513,7 +519,10 @@ public class AllergyIntolerance extends DomainResource {
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)
return "allergy";
if (code == AllergyIntoleranceType.INTOLERANCE)
@ -660,7 +669,10 @@ public class AllergyIntolerance extends DomainResource {
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)
return "food";
if (code == AllergyIntoleranceCategory.MEDICATION)
@ -797,7 +809,10 @@ public class AllergyIntolerance extends DomainResource {
throw new FHIRException("Unknown AllergyIntoleranceCertainty code '" + codeString + "'");
}
public String toCode(AllergyIntoleranceCertainty code) {
public String toCode(AllergyIntoleranceCertainty code)
{
if (code == AllergyIntoleranceCertainty.NULL)
return null;
if (code == AllergyIntoleranceCertainty.UNLIKELY)
return "unlikely";
if (code == AllergyIntoleranceCertainty.LIKELY)
@ -928,7 +943,10 @@ public class AllergyIntolerance extends DomainResource {
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)
return "mild";
if (code == AllergyIntoleranceSeverity.MODERATE)

View File

@ -247,7 +247,10 @@ public class Appointment extends DomainResource {
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)
return "proposed";
if (code == AppointmentStatus.PENDING)
@ -388,7 +391,10 @@ public class Appointment extends DomainResource {
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)
return "required";
if (code == ParticipantRequired.OPTIONAL)
@ -541,7 +547,10 @@ public class Appointment extends DomainResource {
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)
return "accepted";
if (code == ParticipationStatus.DECLINED)

View File

@ -224,7 +224,10 @@ public class AppointmentResponse extends DomainResource {
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)
return "accepted";
if (code == ParticipantStatus.DECLINED)

View File

@ -208,7 +208,10 @@ public class AuditEvent extends DomainResource {
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)
return "C";
if (code == AuditEventAction.R)
@ -364,7 +367,10 @@ public class AuditEvent extends DomainResource {
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)
return "0";
if (code == AuditEventOutcome._4)
@ -534,7 +540,10 @@ public class AuditEvent extends DomainResource {
throw new FHIRException("Unknown AuditEventParticipantNetworkType code '" + codeString + "'");
}
public String toCode(AuditEventParticipantNetworkType code) {
public String toCode(AuditEventParticipantNetworkType code)
{
if (code == AuditEventParticipantNetworkType.NULL)
return null;
if (code == AuditEventParticipantNetworkType._1)
return "1";
if (code == AuditEventParticipantNetworkType._2)

View File

@ -286,7 +286,10 @@ public class Bundle extends Resource implements IBaseBundle {
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)
return "document";
if (code == BundleType.MESSAGE)
@ -431,7 +434,10 @@ public class Bundle extends Resource implements IBaseBundle {
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)
return "match";
if (code == SearchEntryMode.INCLUDE)
@ -580,7 +586,10 @@ public class Bundle extends Resource implements IBaseBundle {
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)
return "GET";
if (code == HTTPVerb.POST)

View File

@ -210,7 +210,10 @@ public class CarePlan extends DomainResource {
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.PROPOSED)
return "proposed";
if (code == CarePlanStatus.DRAFT)
@ -346,7 +349,10 @@ public class CarePlan extends DomainResource {
throw new FHIRException("Unknown CarePlanRelationship code '" + codeString + "'");
}
public String toCode(CarePlanRelationship code) {
public String toCode(CarePlanRelationship code)
{
if (code == CarePlanRelationship.NULL)
return null;
if (code == CarePlanRelationship.INCLUDES)
return "includes";
if (code == CarePlanRelationship.REPLACES)
@ -533,7 +539,10 @@ public class CarePlan extends DomainResource {
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)
return "not-started";
if (code == CarePlanActivityStatus.SCHEDULED)

View File

@ -209,7 +209,10 @@ public class Claim extends DomainResource {
throw new FHIRException("Unknown ClaimType code '" + codeString + "'");
}
public String toCode(ClaimType code) {
public String toCode(ClaimType code)
{
if (code == ClaimType.NULL)
return null;
if (code == ClaimType.INSTITUTIONAL)
return "institutional";
if (code == ClaimType.ORAL)
@ -364,7 +367,10 @@ public class Claim extends DomainResource {
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)
return "complete";
if (code == Use.PROPOSED)

View File

@ -176,7 +176,10 @@ public class ClinicalImpression extends DomainResource {
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.INPROGRESS)
return "in-progress";
if (code == ClinicalImpressionStatus.COMPLETED)

View File

@ -208,7 +208,10 @@ public class Communication extends DomainResource {
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.INPROGRESS)
return "in-progress";
if (code == CommunicationStatus.COMPLETED)

View File

@ -299,7 +299,10 @@ public class CommunicationRequest extends DomainResource {
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.PROPOSED)
return "proposed";
if (code == CommunicationRequestStatus.PLANNED)

View File

@ -200,7 +200,10 @@ public class Composition extends DomainResource {
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)
return "preliminary";
if (code == CompositionStatus.FINAL)
@ -353,7 +356,10 @@ public class Composition extends DomainResource {
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)
return "personal";
if (code == CompositionAttestationMode.PROFESSIONAL)

View File

@ -231,7 +231,10 @@ public class Condition extends DomainResource {
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)
return "provisional";
if (code == ConditionVerificationStatus.DIFFERENTIAL)

View File

@ -180,7 +180,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown ConformanceStatementKind code '" + codeString + "'");
}
public String toCode(ConformanceStatementKind code) {
public String toCode(ConformanceStatementKind code)
{
if (code == ConformanceStatementKind.NULL)
return null;
if (code == ConformanceStatementKind.INSTANCE)
return "instance";
if (code == ConformanceStatementKind.CAPABILITY)
@ -329,7 +332,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "no";
if (code == UnknownContentCode.EXTENSIONS)
@ -444,7 +450,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown RestfulConformanceMode code '" + codeString + "'");
}
public String toCode(RestfulConformanceMode code) {
public String toCode(RestfulConformanceMode code)
{
if (code == RestfulConformanceMode.NULL)
return null;
if (code == RestfulConformanceMode.CLIENT)
return "client";
if (code == RestfulConformanceMode.SERVER)
@ -681,7 +690,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "read";
if (code == TypeRestfulInteraction.VREAD)
@ -825,7 +837,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "no-version";
if (code == ResourceVersionPolicy.VERSIONED)
@ -957,7 +972,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "not-supported";
if (code == ConditionalDeleteStatus.SINGLE)
@ -1225,7 +1243,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "missing";
if (code == SearchModifierCode.EXACT)
@ -1370,7 +1391,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "transaction";
if (code == SystemRestfulInteraction.SEARCHSYSTEM)
@ -1519,7 +1543,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown TransactionMode code '" + codeString + "'");
}
public String toCode(TransactionMode code) {
public String toCode(TransactionMode code)
{
if (code == TransactionMode.NULL)
return null;
if (code == TransactionMode.NOTSUPPORTED)
return "not-supported";
if (code == TransactionMode.BATCH)
@ -1656,7 +1683,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "Consequence";
if (code == MessageSignificanceCategory.CURRENCY)
@ -1769,7 +1799,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
throw new FHIRException("Unknown ConformanceEventMode code '" + codeString + "'");
}
public String toCode(ConformanceEventMode code) {
public String toCode(ConformanceEventMode code)
{
if (code == ConformanceEventMode.NULL)
return null;
if (code == ConformanceEventMode.SENDER)
return "sender";
if (code == ConformanceEventMode.RECEIVER)
@ -1880,7 +1913,10 @@ public class Conformance extends DomainResource implements IBaseConformance {
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)
return "producer";
if (code == DocumentMode.CONSUMER)

View File

@ -209,7 +209,10 @@ public class ContactPoint extends Type implements ICompositeType {
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)
return "phone";
if (code == ContactPointSystem.FAX)
@ -387,7 +390,10 @@ public class ContactPoint extends Type implements ICompositeType {
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)
return "home";
if (code == ContactPointUse.WORK)

View File

@ -238,7 +238,10 @@ public class DataElement extends DomainResource {
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)
return "comparable";
if (code == DataElementStringency.FULLYSPECIFIED)

View File

@ -175,7 +175,10 @@ public class DetectedIssue extends DomainResource {
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)
return "high";
if (code == DetectedIssueSeverity.MODERATE)

View File

@ -173,7 +173,10 @@ public class Device extends DomainResource {
throw new FHIRException("Unknown DeviceStatus code '" + codeString + "'");
}
public String toCode(DeviceStatus code) {
public String toCode(DeviceStatus code)
{
if (code == DeviceStatus.NULL)
return null;
if (code == DeviceStatus.AVAILABLE)
return "available";
if (code == DeviceStatus.NOTAVAILABLE)

View File

@ -314,7 +314,10 @@ public class DeviceComponent extends DomainResource {
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)
return "other";
if (code == MeasmntPrinciple.CHEMICAL)

View File

@ -169,7 +169,10 @@ public class DeviceMetric extends DomainResource {
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)
return "on";
if (code == DeviceMetricOperationalStatus.OFF)
@ -390,7 +393,10 @@ public class DeviceMetric extends DomainResource {
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)
return "black";
if (code == DeviceMetricColor.RED)
@ -550,7 +556,10 @@ public class DeviceMetric extends DomainResource {
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)
return "measurement";
if (code == DeviceMetricCategory.SETTING)
@ -701,7 +710,10 @@ public class DeviceMetric extends DomainResource {
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)
return "unspecified";
if (code == DeviceMetricCalibrationType.OFFSET)
@ -852,7 +864,10 @@ public class DeviceMetric extends DomainResource {
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)
return "not-calibrated";
if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED)

View File

@ -296,7 +296,10 @@ public class DeviceUseRequest extends DomainResource {
throw new FHIRException("Unknown DeviceUseRequestStatus code '" + codeString + "'");
}
public String toCode(DeviceUseRequestStatus code) {
public String toCode(DeviceUseRequestStatus code)
{
if (code == DeviceUseRequestStatus.NULL)
return null;
if (code == DeviceUseRequestStatus.PROPOSED)
return "proposed";
if (code == DeviceUseRequestStatus.PLANNED)
@ -459,7 +462,10 @@ public class DeviceUseRequest extends DomainResource {
throw new FHIRException("Unknown DeviceUseRequestPriority code '" + codeString + "'");
}
public String toCode(DeviceUseRequestPriority code) {
public String toCode(DeviceUseRequestPriority code)
{
if (code == DeviceUseRequestPriority.NULL)
return null;
if (code == DeviceUseRequestPriority.ROUTINE)
return "routine";
if (code == DeviceUseRequestPriority.URGENT)

View File

@ -351,7 +351,10 @@ public class DiagnosticOrder extends DomainResource {
throw new FHIRException("Unknown DiagnosticOrderStatus code '" + codeString + "'");
}
public String toCode(DiagnosticOrderStatus code) {
public String toCode(DiagnosticOrderStatus code)
{
if (code == DiagnosticOrderStatus.NULL)
return null;
if (code == DiagnosticOrderStatus.PROPOSED)
return "proposed";
if (code == DiagnosticOrderStatus.DRAFT)
@ -520,7 +523,10 @@ public class DiagnosticOrder extends DomainResource {
throw new FHIRException("Unknown DiagnosticOrderPriority code '" + codeString + "'");
}
public String toCode(DiagnosticOrderPriority code) {
public String toCode(DiagnosticOrderPriority code)
{
if (code == DiagnosticOrderPriority.NULL)
return null;
if (code == DiagnosticOrderPriority.ROUTINE)
return "routine";
if (code == DiagnosticOrderPriority.URGENT)

View File

@ -252,7 +252,10 @@ public class DiagnosticReport extends DomainResource {
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)
return "registered";
if (code == DiagnosticReportStatus.PARTIAL)

View File

@ -190,7 +190,10 @@ public class DocumentReference extends DomainResource {
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)
return "replaces";
if (code == DocumentRelationshipType.TRANSFORMS)

View File

@ -135,7 +135,10 @@ public class ElementDefinition extends Type implements ICompositeType {
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)
return "xmlAttr";
return "?";
@ -265,7 +268,10 @@ public class ElementDefinition extends Type implements ICompositeType {
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)
return "closed";
if (code == SlicingRules.OPEN)
@ -398,7 +404,10 @@ public class ElementDefinition extends Type implements ICompositeType {
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)
return "contained";
if (code == AggregationMode.REFERENCED)
@ -512,7 +521,10 @@ public class ElementDefinition extends Type implements ICompositeType {
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)
return "error";
if (code == ConstraintSeverity.WARNING)

View File

@ -225,7 +225,10 @@ public class Encounter extends DomainResource {
throw new FHIRException("Unknown EncounterState code '" + codeString + "'");
}
public String toCode(EncounterState code) {
public String toCode(EncounterState code)
{
if (code == EncounterState.NULL)
return null;
if (code == EncounterState.PLANNED)
return "planned";
if (code == EncounterState.ARRIVED)
@ -476,7 +479,10 @@ public class Encounter extends DomainResource {
throw new FHIRException("Unknown EncounterClass code '" + codeString + "'");
}
public String toCode(EncounterClass code) {
public String toCode(EncounterClass code)
{
if (code == EncounterClass.NULL)
return null;
if (code == EncounterClass.INPATIENT)
return "inpatient";
if (code == EncounterClass.OUTPATIENT)
@ -644,7 +650,10 @@ public class Encounter extends DomainResource {
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)
return "planned";
if (code == EncounterLocationStatus.ACTIVE)

View File

@ -188,7 +188,10 @@ public class Enumerations {
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)
return "male";
if (code == AdministrativeGender.FEMALE)
@ -375,7 +378,10 @@ public class Enumerations {
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)
return "min";
if (code == AgeUnits.H)
@ -539,7 +545,10 @@ public class Enumerations {
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)
return "required";
if (code == BindingStrength.EXTENSIBLE)
@ -795,7 +804,10 @@ public class Enumerations {
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.EQUIVALENT)
return "equivalent";
if (code == ConceptMapEquivalence.EQUAL)
@ -938,7 +950,10 @@ public class Enumerations {
throw new FHIRException("Unknown ConformanceResourceStatus code '" + codeString + "'");
}
public String toCode(ConformanceResourceStatus code) {
public String toCode(ConformanceResourceStatus code)
{
if (code == ConformanceResourceStatus.NULL)
return null;
if (code == ConformanceResourceStatus.DRAFT)
return "draft";
if (code == ConformanceResourceStatus.ACTIVE)
@ -1180,7 +1195,10 @@ public class Enumerations {
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)
return "unknown";
if (code == DataAbsentReason.ASKED)
@ -2128,7 +2146,10 @@ public class Enumerations {
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)
return "Address";
if (code == DataType.AGE)
@ -2345,7 +2366,10 @@ public class Enumerations {
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)
return "current";
if (code == DocumentReferenceStatus.SUPERSEDED)
@ -5194,7 +5218,10 @@ public class Enumerations {
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)
return "Address";
if (code == FHIRDefinedType.AGE)
@ -5737,7 +5764,10 @@ public class Enumerations {
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.MEDICATIONADMINISTRATIONCOMPLETE)
return "MedicationAdministration-Complete";
if (code == MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION)
@ -5882,7 +5912,10 @@ public class Enumerations {
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)
return "display";
if (code == NoteType.PRINT)
@ -5995,7 +6028,10 @@ public class Enumerations {
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)
return "complete";
if (code == RemittanceOutcome.ERROR)
@ -7983,7 +8019,10 @@ public class Enumerations {
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)
return "Account";
if (code == ResourceType.ALLERGYINTOLERANCE)
@ -8397,7 +8436,10 @@ public class Enumerations {
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)
return "number";
if (code == SearchParamType.DATE)
@ -8593,7 +8635,10 @@ public class Enumerations {
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)
return "true";
if (code == SpecialValues.FALSE)

View File

@ -234,7 +234,10 @@ public class EpisodeOfCare extends DomainResource {
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)
return "planned";
if (code == EpisodeOfCareStatus.WAITLIST)

View File

@ -191,7 +191,10 @@ public class FamilyMemberHistory extends DomainResource {
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)
return "partial";
if (code == FamilyHistoryStatus.COMPLETED)

View File

@ -166,7 +166,10 @@ public class Flag extends DomainResource {
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)
return "active";
if (code == FlagStatus.INACTIVE)

View File

@ -283,7 +283,10 @@ public class Goal extends DomainResource {
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)
return "proposed";
if (code == GoalStatus.PLANNED)

View File

@ -225,7 +225,10 @@ public class Group extends DomainResource {
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)
return "person";
if (code == GroupType.ANIMAL)

View File

@ -240,7 +240,10 @@ public class HealthcareService extends DomainResource {
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)
return "mon";
if (code == DaysOfWeek.TUE)

View File

@ -249,7 +249,10 @@ public class HumanName extends Type implements ICompositeType {
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)
return "usual";
if (code == NameUse.OFFICIAL)

View File

@ -186,7 +186,10 @@ public class Identifier extends Type implements ICompositeType {
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)
return "usual";
if (code == IdentifierUse.OFFICIAL)

View File

@ -191,7 +191,10 @@ public class ImagingStudy extends DomainResource {
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)
return "ONLINE";
if (code == InstanceAvailability.OFFLINE)

View File

@ -155,7 +155,10 @@ public class ImplementationGuide extends DomainResource {
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)
return "reference";
if (code == GuideDependencyType.INCLUSION)
@ -342,7 +345,10 @@ public class ImplementationGuide extends DomainResource {
throw new FHIRException("Unknown GuideResourcePurpose code '" + codeString + "'");
}
public String toCode(GuideResourcePurpose code) {
public String toCode(GuideResourcePurpose code)
{
if (code == GuideResourcePurpose.NULL)
return null;
if (code == GuideResourcePurpose.EXAMPLE)
return "example";
if (code == GuideResourcePurpose.TERMINOLOGY)
@ -572,7 +578,10 @@ public class ImplementationGuide extends DomainResource {
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)
return "page";
if (code == GuidePageKind.EXAMPLE)

View File

@ -169,7 +169,10 @@ public class List_ extends DomainResource {
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)
return "current";
if (code == ListStatus.RETIRED)
@ -301,7 +304,10 @@ public class List_ extends DomainResource {
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)
return "working";
if (code == ListMode.SNAPSHOT)

View File

@ -172,7 +172,10 @@ public class Location extends DomainResource {
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)
return "active";
if (code == LocationStatus.SUSPENDED)
@ -288,7 +291,10 @@ public class Location extends DomainResource {
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)
return "instance";
if (code == LocationMode.KIND)

View File

@ -168,7 +168,10 @@ public class Media extends DomainResource {
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)
return "photo";
if (code == DigitalMediaType.VIDEO)

View File

@ -210,7 +210,10 @@ public class MedicationAdministration extends DomainResource {
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)
return "in-progress";
if (code == MedicationAdministrationStatus.ONHOLD)

View File

@ -211,7 +211,10 @@ public class MedicationDispense extends DomainResource {
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.INPROGRESS)
return "in-progress";
if (code == MedicationDispenseStatus.ONHOLD)

View File

@ -231,7 +231,10 @@ public class MedicationOrder extends DomainResource {
throw new FHIRException("Unknown MedicationOrderStatus code '" + codeString + "'");
}
public String toCode(MedicationOrderStatus code) {
public String toCode(MedicationOrderStatus code)
{
if (code == MedicationOrderStatus.NULL)
return null;
if (code == MedicationOrderStatus.ACTIVE)
return "active";
if (code == MedicationOrderStatus.ONHOLD)

View File

@ -208,7 +208,10 @@ public class MedicationStatement extends DomainResource {
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)
return "active";
if (code == MedicationStatementStatus.COMPLETED)

View File

@ -176,7 +176,10 @@ public class MessageHeader extends DomainResource {
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)
return "ok";
if (code == ResponseType.TRANSIENTERROR)

View File

@ -176,7 +176,10 @@ public class NamingSystem extends DomainResource {
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)
return "codesystem";
if (code == NamingSystemType.IDENTIFIER)
@ -328,7 +331,10 @@ public class NamingSystem extends DomainResource {
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)
return "oid";
if (code == NamingSystemIdentifierType.UUID)

View File

@ -187,7 +187,10 @@ public class Narrative extends BaseNarrative implements INarrative {
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)
return "generated";
if (code == NarrativeStatus.EXTENSIONS)

View File

@ -263,7 +263,10 @@ public class NutritionOrder extends DomainResource {
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)
return "proposed";
if (code == NutritionOrderStatus.DRAFT)

View File

@ -248,7 +248,10 @@ public class Observation extends DomainResource {
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)
return "registered";
if (code == ObservationStatus.PRELIMINARY)
@ -451,7 +454,10 @@ public class Observation extends DomainResource {
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)
return "has-member";
if (code == ObservationRelationshipType.DERIVEDFROM)

View File

@ -156,7 +156,10 @@ public class OperationDefinition extends DomainResource {
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)
return "operation";
if (code == OperationKind.QUERY)
@ -267,7 +270,10 @@ public class OperationDefinition extends DomainResource {
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)
return "in";
if (code == OperationParameterUse.OUT)

View File

@ -189,7 +189,10 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
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)
return "fatal";
if (code == IssueSeverity.ERROR)
@ -810,7 +813,10 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu
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)
return "invalid";
if (code == IssueType.STRUCTURE)

View File

@ -278,7 +278,10 @@ public class OrderResponse extends DomainResource {
throw new FHIRException("Unknown OrderStatus code '" + codeString + "'");
}
public String toCode(OrderStatus code) {
public String toCode(OrderStatus code)
{
if (code == OrderStatus.NULL)
return null;
if (code == OrderStatus.PENDING)
return "pending";
if (code == OrderStatus.REVIEW)

View File

@ -180,7 +180,10 @@ public class Patient extends DomainResource {
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.REPLACE)
return "replace";
if (code == LinkType.REFER)

View File

@ -189,7 +189,10 @@ public class Person extends DomainResource {
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)
return "level1";
if (code == IdentityAssuranceLevel.LEVEL2)

View File

@ -187,7 +187,10 @@ public class Procedure extends DomainResource {
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.INPROGRESS)
return "in-progress";
if (code == ProcedureStatus.ABORTED)

View File

@ -296,7 +296,10 @@ public class ProcedureRequest extends DomainResource {
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.PROPOSED)
return "proposed";
if (code == ProcedureRequestStatus.DRAFT)
@ -459,7 +462,10 @@ public class ProcedureRequest extends DomainResource {
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)
return "routine";
if (code == ProcedureRequestPriority.URGENT)

View File

@ -188,7 +188,10 @@ public class ProcessRequest extends DomainResource {
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)
return "cancel";
if (code == ActionList.POLL)

View File

@ -202,7 +202,10 @@ public class Provenance extends DomainResource {
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)
return "derivation";
if (code == ProvenanceEntityRole.REVISION)

View File

@ -187,7 +187,10 @@ public class Quantity extends Type implements ICompositeType {
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)
return "<";
if (code == QuantityComparator.LESS_OR_EQUAL)

View File

@ -171,7 +171,10 @@ public class Questionnaire extends DomainResource {
throw new FHIRException("Unknown QuestionnaireStatus code '" + codeString + "'");
}
public String toCode(QuestionnaireStatus code) {
public String toCode(QuestionnaireStatus code)
{
if (code == QuestionnaireStatus.NULL)
return null;
if (code == QuestionnaireStatus.DRAFT)
return "draft";
if (code == QuestionnaireStatus.PUBLISHED)
@ -520,7 +523,10 @@ public class Questionnaire extends DomainResource {
throw new FHIRException("Unknown AnswerFormat code '" + codeString + "'");
}
public String toCode(AnswerFormat code) {
public String toCode(AnswerFormat code)
{
if (code == AnswerFormat.NULL)
return null;
if (code == AnswerFormat.BOOLEAN)
return "boolean";
if (code == AnswerFormat.DECIMAL)

View File

@ -174,7 +174,10 @@ public class QuestionnaireResponse extends DomainResource {
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)
return "in-progress";
if (code == QuestionnaireResponseStatus.COMPLETED)

View File

@ -243,7 +243,10 @@ public class ReferralRequest extends DomainResource {
throw new FHIRException("Unknown ReferralStatus code '" + codeString + "'");
}
public String toCode(ReferralStatus code) {
public String toCode(ReferralStatus code)
{
if (code == ReferralStatus.NULL)
return null;
if (code == ReferralStatus.DRAFT)
return "draft";
if (code == ReferralStatus.REQUESTED)

View File

@ -214,7 +214,10 @@ public class SearchParameter extends DomainResource {
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)
return "normal";
if (code == XPathUsageType.PHONETIC)

View File

@ -188,7 +188,10 @@ public class Slot extends DomainResource {
throw new FHIRException("Unknown SlotStatus code '" + codeString + "'");
}
public String toCode(SlotStatus code) {
public String toCode(SlotStatus code)
{
if (code == SlotStatus.NULL)
return null;
if (code == SlotStatus.BUSY)
return "busy";
if (code == SlotStatus.FREE)

View File

@ -189,7 +189,10 @@ public class Specimen extends DomainResource {
throw new FHIRException("Unknown SpecimenStatus code '" + codeString + "'");
}
public String toCode(SpecimenStatus code) {
public String toCode(SpecimenStatus code)
{
if (code == SpecimenStatus.NULL)
return null;
if (code == SpecimenStatus.AVAILABLE)
return "available";
if (code == SpecimenStatus.UNAVAILABLE)

View File

@ -176,7 +176,10 @@ public class StructureDefinition extends DomainResource {
throw new FHIRException("Unknown StructureDefinitionKind code '" + codeString + "'");
}
public String toCode(StructureDefinitionKind code) {
public String toCode(StructureDefinitionKind code)
{
if (code == StructureDefinitionKind.NULL)
return null;
if (code == StructureDefinitionKind.DATATYPE)
return "datatype";
if (code == StructureDefinitionKind.RESOURCE)
@ -331,7 +334,10 @@ public class StructureDefinition extends DomainResource {
throw new FHIRException("Unknown ExtensionContext code '" + codeString + "'");
}
public String toCode(ExtensionContext code) {
public String toCode(ExtensionContext code)
{
if (code == ExtensionContext.NULL)
return null;
if (code == ExtensionContext.RESOURCE)
return "resource";
if (code == ExtensionContext.DATATYPE)

View File

@ -192,7 +192,10 @@ public class Subscription extends DomainResource {
throw new FHIRException("Unknown SubscriptionStatus code '" + codeString + "'");
}
public String toCode(SubscriptionStatus code) {
public String toCode(SubscriptionStatus code)
{
if (code == SubscriptionStatus.NULL)
return null;
if (code == SubscriptionStatus.REQUESTED)
return "requested";
if (code == SubscriptionStatus.ACTIVE)
@ -368,7 +371,10 @@ public class Subscription extends DomainResource {
throw new FHIRException("Unknown SubscriptionChannelType code '" + codeString + "'");
}
public String toCode(SubscriptionChannelType code) {
public String toCode(SubscriptionChannelType code)
{
if (code == SubscriptionChannelType.NULL)
return null;
if (code == SubscriptionChannelType.RESTHOOK)
return "rest-hook";
if (code == SubscriptionChannelType.WEBSOCKET)

View File

@ -166,7 +166,10 @@ public class SupplyDelivery extends DomainResource {
throw new FHIRException("Unknown SupplyDeliveryStatus code '" + codeString + "'");
}
public String toCode(SupplyDeliveryStatus code) {
public String toCode(SupplyDeliveryStatus code)
{
if (code == SupplyDeliveryStatus.NULL)
return null;
if (code == SupplyDeliveryStatus.INPROGRESS)
return "in-progress";
if (code == SupplyDeliveryStatus.COMPLETED)

View File

@ -188,7 +188,10 @@ public class SupplyRequest extends DomainResource {
throw new FHIRException("Unknown SupplyRequestStatus code '" + codeString + "'");
}
public String toCode(SupplyRequestStatus code) {
public String toCode(SupplyRequestStatus code)
{
if (code == SupplyRequestStatus.NULL)
return null;
if (code == SupplyRequestStatus.REQUESTED)
return "requested";
if (code == SupplyRequestStatus.COMPLETED)

View File

@ -154,7 +154,10 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown ContentType code '" + codeString + "'");
}
public String toCode(ContentType code) {
public String toCode(ContentType code)
{
if (code == ContentType.NULL)
return null;
if (code == ContentType.XML)
return "xml";
if (code == ContentType.JSON)
@ -265,7 +268,10 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown AssertionDirectionType code '" + codeString + "'");
}
public String toCode(AssertionDirectionType code) {
public String toCode(AssertionDirectionType code)
{
if (code == AssertionDirectionType.NULL)
return null;
if (code == AssertionDirectionType.RESPONSE)
return "response";
if (code == AssertionDirectionType.REQUEST)
@ -520,7 +526,10 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown AssertionOperatorType code '" + codeString + "'");
}
public String toCode(AssertionOperatorType code) {
public String toCode(AssertionOperatorType code)
{
if (code == AssertionOperatorType.NULL)
return null;
if (code == AssertionOperatorType.EQUALS)
return "equals";
if (code == AssertionOperatorType.NOTEQUALS)
@ -827,7 +836,10 @@ public class TestScript extends DomainResource {
throw new FHIRException("Unknown AssertionResponseTypes code '" + codeString + "'");
}
public String toCode(AssertionResponseTypes code) {
public String toCode(AssertionResponseTypes code)
{
if (code == AssertionResponseTypes.NULL)
return null;
if (code == AssertionResponseTypes.OKAY)
return "okay";
if (code == AssertionResponseTypes.CREATED)

View File

@ -245,7 +245,10 @@ public class Timing extends Type implements ICompositeType {
throw new FHIRException("Unknown UnitsOfTime code '" + codeString + "'");
}
public String toCode(UnitsOfTime code) {
public String toCode(UnitsOfTime code)
{
if (code == UnitsOfTime.NULL)
return null;
if (code == UnitsOfTime.S)
return "s";
if (code == UnitsOfTime.MIN)
@ -582,7 +585,10 @@ public class Timing extends Type implements ICompositeType {
throw new FHIRException("Unknown EventTiming code '" + codeString + "'");
}
public String toCode(EventTiming code) {
public String toCode(EventTiming code)
{
if (code == EventTiming.NULL)
return null;
if (code == EventTiming.HS)
return "HS";
if (code == EventTiming.WAKE)

View File

@ -230,7 +230,10 @@ public class ValueSet extends DomainResource {
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)
return "=";
if (code == FilterOperator.ISA)

View File

@ -154,7 +154,10 @@ public class VisionPrescription extends DomainResource {
throw new FHIRException("Unknown VisionEyes code '" + codeString + "'");
}
public String toCode(VisionEyes code) {
public String toCode(VisionEyes code)
{
if (code == VisionEyes.NULL)
return null;
if (code == VisionEyes.RIGHT)
return "right";
if (code == VisionEyes.LEFT)
@ -301,7 +304,10 @@ public class VisionPrescription extends DomainResource {
throw new FHIRException("Unknown VisionBase code '" + codeString + "'");
}
public String toCode(VisionBase code) {
public String toCode(VisionBase code)
{
if (code == VisionBase.NULL)
return null;
if (code == VisionBase.UP)
return "up";
if (code == VisionBase.DOWN)